cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Trigger flow when only one field in list is modified

Hello - I have a flow that triggers an automated email when a list field, "Status" changes from 'Open' to closed. However, the email triggers whenever any field is changed. Is there a way to fine tune so that this will only trigger on the desired field and no other field?

 

 inkedFlow.jpg

26 REPLIES 26

@anilrambhajan 

Well you don't actually need to create 8 flows in such scenarios.

Here's a simple approach to deal with that situation:

1. Add all the 8 Status value to initiate and trigger the flow[settings->trigger conditions].

2. Within the flow, either use 'If condition' branching or 'switch' case to perform different task on different status value.

 

Job done in a single flow!

Ok, understood. I see what you are saying. Thank you for your response.

Can you share the logic to run when only status field is changed from open to close

shawn_fielding
Helper I
Helper I

Here's how I do it.  Not saying it's the best way, but it works.

1. On the list, create a status field and an previous status field, and set both to the same when created.

2.  I assume someone else changes the status from open to closed.  On change, if the status and previous status.  If the statuses are different.  If so, do whatever action you wanted to happen.

3.  Change the previous status to closed using the flow.  

GLaDOS_Lives
New Member

There is a template I do not remember seeing in the past regarding this subject entitled "Send a push notification when a column is changed in a SharePoint list".  I know it doesn't specify a column within a specific item but the description "check the previous version and compare the status indicator"... However, when looking at the template to determine what it is actually doing, I get lost pretty quick because my  coding background is rather limited.  Just thought I would point it out and someone with more knowledge could take a look and see if anything in that template could potentially help solve this particular issue. 

GLaDOS_Lives  that template is getting the 2 most recent versions of the list item (using HTTP request).  Then the condition compares the Status indicator of each version.  This method can be used to make comparisons to previous values once the flow has been triggered.  If you do not care what the values has changed to (or from) you can use the "Get changes for an item or a file (properties only)" action that will return True for any column that has changed.  

 

But for the original question posted, the key is to use a Trigger condition to run the flow only if a column value has a specific value.   This would be to run only when the Status column and a different column named OldStatus are not equal.  As long as they are equal, the flow would never even trigger.

guanel1
Regular Visitor

In your List, create a new column called "Flow Status". Make the column a Choice column with letters as the choices. (A, B, C, D, etc). You should create enough choices for each new flow that is related to the changes. Make this column default to "A" when a new line is added. You can hide this column as well if it is confusing for others to see. It is only here to help with the flow. 

 

in Power Automate, after you create the Send Email flow, add an "Update Item" step. 

Add the List associated to this flow. In the column called "Flow Status" have the choice now be changed to B. 

And above the email, in the condition, add a condition that the Flow Status = A. 

 

So when this is triggered, it will initially send an email for the first time it runs. Then, the flow will update the "Flow Status" column to "B". And then the email will not be triggered again. See below for an example of how i used this previously. highlighted in Yellow is the change to this Flow Status column. 

guanel1_0-1654628894970.png

 

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (3,171)