Create a Workflow that Fires when a Value Changes

Donal McCarthy
By | Updated November 27, 2013 | 3 min read
project milestone

Despite three generations of SharePoint Designer Workflows, you still have to use a trick to get a workflow to fire when something changes to something else (e.g. someone changes the value in an Item Status column from ‘Draft’ to ‘Submitted’).

Note: This post assumes you have some knowledge of creating workflows in SharePoint Designer.

 

 

Workflow Scenario

Imagine you have a Change Request list that needs a workflow that does the following:

  • If the Change Request Status column in the item is set to ‘For Action’, you want the person specified as the Assignee to be notified (via email) that they have an item they need to action
  • If the Change Request Status column in the item is set to ‘For Review’, you want the person specified as the Approver to be notified (via email) that they have an item they need to review and either Approve or send back for Rework
  • If the Approver sets the Change Request Status column to ‘Rework’, you want the item Assignee to be notified of same and the reasons that the Approver gave.
  • If the Approver sets the Change Request Status column to ‘Approved’, you want the item Assignee to be notified of same.

The problem is that out-of-the-box SharePoint Designer workflows can only fire if something is equal to or is not equal to something else (yes there are other triggers, but not relevant ones). There is no trigger that allows you to say ‘if something changes to something else, then do this’.

If you have the workflow fire when the item is set to ‘For Review’, it will do so every time the item is edited, which basically means that people will start ignoring your notification emails.

To get the workflow to fire only when something changes to something specific, you need to add a hidden column. You set your workflow to run if the value in the hidden column is not equal to the column you are tracking and then get the workflow to update the hidden column to the same as the column you want the workflow to run off!

So, let’s say  I have a Change Request Status choice column in my list with the below values:

  • For Analysis
  • For Action
  • For Review
  • Rework
  • Approved and Completed

I add a text column called Change Request Hidden and hide the column by enabling the management of content types.

I crack open SharePoint Designer and create the below workflow! The last step is very important – it’s the one where you update the hidden column to be the same as the choice column you want to trigger the workflow.

Change Request Workflow

Next time, I will explain how to include a link to the specific item in the notifications emails described above – this is another thing that is not as easy as you would expect!

 

Image credit 

Donal McCarthy
Donal McCarthy

Donal has been a BrightWorker for so long, he remembers when his desktop got Windows XP. Starting as a technical writer, he is now responsible for making sure all the marketing systems make life beautiful for our website visitors, prospects and sales teams. He is a firm Microsoftie, and enjoys writing 'how to' articles and posts about the latest in technology from Microsoft. Outside of BrightWork, he is a family man who enjoys reading, cooking, and following the Irish and Connacht rugby teams.

Read Full Bio
Don't forget to share this post!