I am trying to setup a workflow for a datasheet list that would send an email when a field in an item is changed to particular value and only once – not when you change any of the other fields. This would be like a status so when the field is changed to another value – nothing will happen and if the field is changed to that particular value again the workflow runs again. Is this possible?
3 Answers
Create an additional column in your list which can be excluded from the datasheet view. Make it a choice column called Email Flag with the default value being no.
In SharePoint Designer you create a new workflow that fires on item change. You create a condtion If Field equals XXX and Email Flag equals No and create an Action to email a user and Update an item. The update item sets the Email Flag to Yes and prevents the workflow from refiring.
Publish the workflow and emails will be sent to the specified user when the condition is met.
-
-
What if you want to change that field again to a different status and then to that status on which you want to run the workflow? ie the column will say yes but you still want to run the workflow as the status has been changed to that value again. Commented Oct 13, 2011 at 20:27
-
Then you'd need to have some additional logic in the workflow that resets the flags so the email could be sent again or use the Else If branch to specify other conditions if the email should fire. Commented Oct 13, 2011 at 20:35
-
That is exactly what I need, could you pleaes tell me how to use the else if branch to get this? Im new with sharepoint. Commented Oct 13, 2011 at 20:53
-
I'd need some specifics in order to fully answer your question. What are the fields and under what circumstances should the emails be sent. Commented Oct 14, 2011 at 1:03
You can use the action Wait for, which waits for the particular field to change its value.
I have sorted out. Not that difficult in the end. https://blogs.msdn.microsoft.com/sharepointdesigner/2008/08/08/how-to-run-a-workflow-when-a-specific-field-changes/ this helped.