Start a Power Automate flow when one specific column has changed

A common trigger for a Power Automate flow is when an item has changed. But i some cases you only want to continue with the flow when a specific column has changed. 


A solution I found was to check and compare a previous version of the item and then decide to continue.


Here's an example: 




Step 1

Use the trigger When an item is created or modified

Step 2

Initialize some variables. I've set the intVersionNumber to the version number from the trigger. And also convert it from a string to an integer. 

int(triggerBody()?['{VersionNumber}'])

Step 3 

Decrement the version number by 1

Step 4

Then get changes for an item or a file (properties only)


Use the Item ID from the trigger.
In the field Since you enter the variable we've just decremented. 
If we leave Until empty it will compare the the latest version. 

Step 5

The use a condition to check if the desired field has changed. 


In this case we are checking if the field wpStage has changed since the previous version. 
This means that the changing of the field wpStage has triggered the flow. 


Done!
Happy flowing

Comments

Popular posts from this blog

100.000 contacts for TyT MD-2017

De Kunst van het gebruik van Prompts in ChatGPT en Bing Chat Enterprise

Show a users display name in a PnP Modern Search Results Web Part using handlebars helpers