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

SharePoint list item field updated

It would be good if we could set a 'Flow' to only work when the value of a field changes.

 

Example:

 

We have a 'column' with 3 possible options 1) Planning, 2) Promote, 3) Finished.

 

When a new item is created by default the column is set to 'Planning'.

 

Although many other changes may occur in other columns, we would only want the 'Flow' to start when this particular column is changed. But when other columns are changed no 'Flow' is triggered.

 

Hope this is something that could be implemented, as the current 'Flows' will run each time any column is updated.

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft Employee

Re: SharePoint list item field updated

If you use the Sharepoint Connector Trigger for When a Sharepoint item is created or modified and then a Switch case switchflow.PNG

You can accomplish this already. This will run everytime something is added or changed but it won't take any actions unless you define it to. 

31 REPLIES 31
PLN
Level: Powered On

Trigger a flow when a specif SharePoint list field is updated.

Today a trigger is generated if any field in a list is updated. This is not enough to generate effective workflows on sharepoint list. The sugegstion is to give the option of specify the Field of the list on to be considered to generate the trigger ...

Thanks

 

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

MMetodiev
Level: Powered On

Re: If SharePoint List Field Updated

I agree with this. It should be easy to add an IF statement for the flow to only look for changes in a specific column. For example, I only need to receive an email when an item in an Open Issues List has been changed from open to close. Simple!!

Microsoft Employee

Re: SharePoint list item field updated

If you use the Sharepoint Connector Trigger for When a Sharepoint item is created or modified and then a Switch case switchflow.PNG

You can accomplish this already. This will run everytime something is added or changed but it won't take any actions unless you define it to. 

CWilcox
Level: Powered On

Re: SharePoint list item field updated

 Hi MWilliams86,

 

Thanks for that, that sounds brilliant.

 

Thank you for the assistance.

driverdo19
Level: Powered On

Re: SharePoint list item field updated

@MWilliams86 indeed, but it does cost you extra runs...

Re: SharePoint list item field updated

The suggested solution is great if you know the possible values for a field - but what if you want to do something only if the text in a field has changed, for example? Right now the only work around I've seen suggested is to store the "original" value in its own column so you can compare the old vs. the new value and take action, and then update the tracking column with the new value so they match again..... Feels awfully clunky.

Pandra
Level: Powered On

Re: SharePoint list item field updated

MWilliams86, thanks for the above suggestion. 

 

Interesting approach indeed. My case is a little different and this would not work:

 

I have an Onboarding list, and need to notifiy the next department when the current department updates the record. All departments indicate their completion by checking a separate Y/N box for their department - that's the trigger I need, simply when a value changes on a specific field. All of my "complete" fields are Y/N, so the Switch Case example would not work here, because all of the values I'm looking for are "Y" or "Yes"

 

Flow Team - we do need a new trigger based soley on when a value changes. That would make a lot of people very productive with this, and very happy. It's already part of the ..."when created or updated" trigger - a modified version of that would be great. Make it so! Smiley Happy

 

 

 

 

 

Microsoft Employee

Re: SharePoint list item field updated

Hey Pandara,

 

You can accomplish your sceanario with a serires of nested Condition steps. 

 

When an item is created or modified -> Condition: IF department 1 checkfield IsBlank() -> Yes condition send email to department 1 for approval -> No condition: New Condition: IF department 1 checkfield = "y" or "yes" AND department 2 checkfield IsBlank(), ....

 

And keeping nesting for however meany departments you need with each department having its own checkfield for the Condition IF statements to check for. 

 

At least that's how I'd approach that scenario until different functionality is created in Flow. Smiley Happy

Pandra
Level: Powered On

Re: SharePoint list item field updated

 

 

 

 

mab17
Level: Powered On

Re: SharePoint list item field updated

I'm creating a flow for a QC process that involves 5 different employees in our office.  As an item in a Sharepoint list gets modified, and when a Yes/No column in my list is changed from "no" to "yes", I've set up a condition for my flow to send an email to the next employee needing to work the QC process.  Unfortunately, the flow keeps dupicating emails to the first member of the QC process.  I'm struggling to figure out how to modify the flow so repeating emails are no longer generated to the initial first members of the QC process. Any suggestions would be greatly appreciated!

Flow issue.PNG

driverdo19
Level: Powered On

Re: SharePoint list item field updated

@mab17you could create an array (via compose action) where you store all the names of the persons already received an e-mail, and check this array before sending the next e-mails in line.

 

At least that's how I could tackle this one Smiley Wink

mab17
Level: Powered On

Re: SharePoint list item field updated

@driverdo19 Thanks for your reply.  I like your idea, however I'm still a little confused as to how to create an array.  I've searched for info but am new enough to FLOW not all instructions are helpful.  Any further direction would be greatly appreciated.

 

driverdo19
Level: Powered On

Re: SharePoint list item field updated

You will probably need the compose action to accomplish this.

See post below for some more information: https://powerusers.microsoft.com/t5/Building-Flows/create-array-in-apply-each/td-p/62719

nssystem
Level: Power Up

Re: SharePoint list item field updated

Further to this, by triggering on every change, we consume our allowance in a couple days. Need to be able to create an environment where the flow only coumnts when it actually does something. I set hidden fields, but flow still fires and counts against quote. Worse is that if the flow changes a column then it fires again so I pay for two flows every time I update a filed.... be awesome to run only when a specific field changes.    Use Nintex as a role model on this where they add a conditional section before th flow starts....   like start if this field ahances AND ... so we can create complex rules to determine if the flow even runs.      

Pengster
Level: Power Up

Re: SharePoint list item field updated

I don't understand how this is marked as complete. I tried the solution and it obviously does not do what the original question wants.

 

If I want to do something when the status changes from A to B, if it so happens that the original status is A, and they make a modification to B, then the flow runs. Then, if someone changes another field, but the status is still B, then the flow runs again. That's not right. It should only run when the status is updated, not when "anything" is modified and the status remains B.

grahampasmurf
Level: Powered On

Re: SharePoint list item field updated

I searched and found a blog post that solves this issue using a combination of List Versioning and an HTTP Request.

 

SharePoint Trigger on specific fields changed via SP HTTP Request

 

http://johnliu.net/blog/2018/5/microsoft-flow-sharepoint-trigger-on-specific-fields-changed-via-sp-h...

 

I had to enable Item Version History in the list settings.  Then I added an action "SharePoint - Send an HTTP Request to SharePoint" and have it GET this Uri on my SharePoint site -

_api/web/lists/getbytitle('ListName')/items(10)/versions?$top=2

 

Last, I added a Select action to filter the output into an array -

body('SPREST-Versions')?['value']

and used a Condition to test if the new value is equal to the old value,

first(body('SelectVersions'))?['Title'] is equal to last(body('SelectVersions'))?['Title']

Read blog post for details.

Lexnnn
Level: Powered On

Re: SharePoint list item field updated

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

 

 

Hope this helps!

 

sarah5
Level: Power Up

Re: SharePoint list item field updated

This is insane! There needs to be an easier solution for a highly requested feature. Not all of us who use microsoft flow know how to create complex coding like the solution offered here (which seems great so thank you, it helped) - http://johnliu.net/blog/2018/5/microsoft-flow-sharepoint-trigger-on-specific-fields-changed-via-sp-h...

 

There needs to be an automatic trigger where we can select via the dynamic content list to identify fields we want to be notified of any changes! 

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

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

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 Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 74 members 4,554 guests
Please welcome our newest community members: