cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Epeck1978
Frequent Visitor

Need Help - Only Trigger when a specific value "changes" to X - Azure Devops

Hello,

 

Need some help with the flow below. We want the flow to only write to an excel table when a field in Azure Devops is set to true. Whats happening right now is that it writes the initial row when the value is changed to true, but then it is adding duplicate rows for all changes on the task/bug's going forward because the task/bug have a value of "true" vs only writing a new row when the value is "Changed" to "true".

 

New to power automate, any help would be much appreciated! Thank you in advance.

 

Azure Custom field names

Custom.QAPass - Default is False

Custom.QAFail - Default is False

 

Code Peek

{
    "inputs": {
        "host": {
            "connection": {
                "name""@parameters('$connections')['shared_visualstudioteamservices']['connectionId']"
            }
        },
        "method""get",
        "path""/v2/workitemupdated_trigger/@{encodeURIComponent('XXXXX')}/_apis/wit/wiql",
        "queries": {
            "account""XXXXXX",
            "team""XXXXXX",
            "wiql__System_WorkItemType""Bug",
            "areaPathComparison""Equals",
            "iterationPathComparison""Equals"
        },
        "authentication""@parameters('$authentication')"
    },
    "recurrence": {
        "interval"1,
        "frequency""Minute"
    },
    "metadata": {
        "flowSystemMetadata": {
            "swaggerOperationId""OnWorkItemUpdatedV2"
        }
    },
    "splitOn""@triggerBody()?['value']"
}

 

Flow Screenshot.jpg

1 ACCEPTED SOLUTION

Accepted Solutions

 

Hi @Epeck1978 ,

 

There is currently no suitable way to monitor whether the field specified in the work item has been changed, you can consider using other methods to achieve your needs.

 

I speculate that when you add a record to the Excel table, you should also add the record id. You can rely on id to filter records in the table.

 

If there is already a related record in the current table, there is no need to add a record, you can choose to update the record.

If this record does not exist, then add a new record.

 

Note that there can be no spaces in the middle of the id field name in the table.

 

You could also add Update row action in if no branch and set id field as a key column.

Image reference:

Spoiler
121.PNG122.PNG

 

Hope that makes sense.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
efialttes
Super User
Super User

Hi!

In both of your condition rules, you added 'true' as text. Did you considered adding it as an expression?

Please follow these steps:

https://flow.microsoft.com/es-es/blog/use-expressions-in-actions/

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Again, new to power automated and more of a business user. Can you provide some guidance on what expression I might use and how it might be formatted?

Hi!

My suggestion is to add 'true' as an WDL expression, not as a string.

Please follow the steps from the link I shared on my previous email

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



 

Hi @Epeck1978 ,

 

There is currently no suitable way to monitor whether the field specified in the work item has been changed, you can consider using other methods to achieve your needs.

 

I speculate that when you add a record to the Excel table, you should also add the record id. You can rely on id to filter records in the table.

 

If there is already a related record in the current table, there is no need to add a record, you can choose to update the record.

If this record does not exist, then add a new record.

 

Note that there can be no spaces in the middle of the id field name in the table.

 

You could also add Update row action in if no branch and set id field as a key column.

Image reference:

Spoiler
121.PNG122.PNG

 

Hope that makes sense.

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for taking the time to look into this for me. Very much appreciated

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,336)