cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
stevenhibble
Level: Powered On

If SharePoint List Field Updated

When trying to build a workflow around a particular field in a SharePoint list, we have to use the "When an existing item is modified" condition and a check against a hidden "previous value" column. If the column and the previous value column differ, then do action. This gets more and more cumbersome with each additional column/flow. Instead, I'd like a condition that checks for a specific field being updated.

For example:

If I want to do a different event depending on the new value of the Status column, I have to write a flow like:

CONDITION: When an existing item is modified >
CONDITION: If Status does not equal Status (previous) >

CONDITION: If Status equals "Pending"

    ACTION: Email Approvers

    ELSE CONDITION: If Status equals "Approved"

        ACTION: Email Submitters

        ELSE CONDITION: If Status equals "Rejected"

            ACTION: Email Submitters

ACTION: Update Status (previous), set to Status

 

 

What I'd prefer is:

 

If I want to do a different event depending on the new value of the Status column, I have to write a flow like:

CONDITION: When a specific field is modified >

CONDITION: If Status equals "Pending"

    ACTION: Email Approvers

    ELSE CONDITION: If Status equals "Approved"

        ACTION: Email Submitters

        ELSE CONDITION: If Status equals "Rejected"

            ACTION: Email Submitters

5 REPLIES 5
Community Support Team
Community Support Team

Re: If SharePoint List Field Updated

Hi @stevenhibble,

 

So far, this cannot be achieved in Flow.

You could post this idea in the Flow Ideas forum, so it might be considered for future releases.

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Regards,

Mona Li

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
powerwood
Level: Powered On

Re: If SharePoint List Field Updated

How would you write this formula? Specifically how would you write it to capture the "previous" field change?

Highlighted
stevenhibble
Level: Powered On

Re: If SharePoint List Field Updated

Start with two fields: Status and Status (previous).

Initialize them to the same value (e.g. "Pending" or blank).

Hide Status (previous) from all user views (you only want Status updated by end-users or any other processes).

 

The flow should check that the item has been modified, then check that Status doesn't equal Status (previous).

Then, update Status (previous) to the new Status value (so that the next change compares against the new value).

Then, do whatever you need to do. The example in my original question shows the full layout:

CONDITION: When an existing item is modified >
CONDITION: If Status does not equal Status (previous) >

ACTION: Update Status (previous), set to Status

CONDITION: If Status equals "Pending"

    ACTION: Email Approvers

    ELSE CONDITION: If Status equals "Approved"

        ACTION: Email Submitters

        ELSE CONDITION: If Status equals "Rejected"

            ACTION: Email Submitters

powerwood
Level: Powered On

Re: If SharePoint List Field Updated

Is there a way to automatically update the "Status (previous)" field when you change the "Status" field?

 

Thank you.

Lexnnn
Level: Powered On

Re: If SharePoint List Field Updated

In addition to be below solution idea I would add a switch case for your problem.

 

I have an approval process for list items and I wanted to send an approval email only when the status of the item changed from "Ordered" to "Ready".
 
The change of the status "Ordered" to "Ready" is an automized process so I though I would just put a "Wait until" or "Wait" function but this was not possible as the wait time is not always the same. I wanted to send an approval email from the moment it's ready so I have searched for a solution where there would be a check on a specific field. 
 
I tried using switch case or condition but there was a problem when other fields were updated and the condition was already fulfilled, it would send again an approval email:
eg item changed - Status is not "Ready" = Terminate (that's OK)
item changed - Status is "Ready" = send approval email (that's correct) but now item is changed again, other field is updated and the status is still "Ready" = approval email resent (that's not correct as it does not check what was updated" 
 
I did not want to use nested conditions or switch cases.
The solution link provided by grahampasmurf with version checking did the trick!! http://johnliu.net/blog/2018/5/microsoft-flow-sharepoint-trigger-on-specific-fields-changed-via-sp-h...
 
Thank you for that!
 
It did require some adaptation but it works!
 

flowemail1.PNGflowemail2.PNG 

 

- ID can be found in "See more" Dynamic content
- SPREST-Versions is just renamed "Send HTTP request to Sharepoint"
- In the Url, if you use space or other special chars, you need to pay attention to how it's written eg space = %20
- Value is the expression from the linked website Body('SPREST-Versions')?['value']
- Orderstatus = valuefield "ValoTeamwork" is not found via Dynamic content but via Output from "Select" When I used the Dynamic content value it did not work as "Valo Teamwork" contained the actual value and was passing it throung to "GroupSiteUrl" from Dynamic content which remaind always the same.
- HTML table is not needed but usefull to debug and make sure it works correctly
- Conditions can again be found on the linked website: first(body('Select'))?['Orderstatus'] - last(body('Select'))?['Orderstatus']

 

More about approval flow

https://powerusers.microsoft.com/t5/Using-Flows/Flow-and-SharePoint-List-Status/m-p/132299#M3532

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (7,399)