Forum Discussion
karthik thenparai
Apr 13, 2018Copper Contributor
Trigger sharepoint workflow when a column value is modified
I've a list which has 30 column fields. One of the fields is Annualized benefit and Review status & Review status(before)
Annualized benefit is a numeric field (user input) and Review status is a drop down option, Review status(before) will get the value from Review status.
Requirement: I want to trigger an email to users on meeting all the below 3 conditions
1. Annualized benefit field is modified
2. Review status value = completed
3. Review status(before) value = completed
I can do it for 2 & 3 but unable to crack it to get #1 also included.
4 Replies
Sort By
- Matt CoatsSteel Contributor
I think there may be a way to trick a Flow into recognizing a particular field's change, but it will require some user cooperation.
I propose you create an additional field to contain a copy of your Annualized Benefit's last known value; for any new item, you would have to know to copy the original annualized benefit value here or use a Flow to copy it (this'll make sense in a minute). After that, create a Flow to accomplish the following:
- When item is modified:
- If Annualized Benefit does not equal Annualized Benefit Copy:
- Email users
- Set Annualized Benefit Copy equal to Annualized Benefit
- Else
- Do Nothing
- If Annualized Benefit does not equal Annualized Benefit Copy:
What this Flow does is essentially use a placeholder field (Annualized Benefit Copy) to check if Annualized Benefit has changed. Since Annualized Benefit Copy should be the same value as before Annualized Benefit was changed, this serves as your reference point. After that check is complete and your users are emailed, you then make Annualized Benefit Copy equal to Annualized Benefit, which effectively prevents your Flow from triggering on any other random change that might occur to the item. This requires that our users know to stay away from the Copy field, as any tampering with it will break the purpose of your Flow. Modifying Views and New Item forms should help prevent that from accidentally happening, though.
- karthik thenparaiCopper ContributorThe change in field values are stored in version history of each list item. So, when annualized benefit field is modified. The previous and new value are available in version history. Is there any way to retrieve and check for change in value and trigger email alert and set the value back to old value?
- Michael BoonieCopper Contributor
I was able to use information from this post to do something much like that. I was able to get the current value as well as the previous value, compare them, and take the appropriate action based on the results.
- When item is modified:
- Workflows in SharePoint are triggered when a modification in the current item / document is done...this modification can be done to a change in one or several fields in the list / document library...being said that, there is not way when the workflow is triggered to determine which field caused the workflow to get started