SharePoint Designer workflow workarounds: tracking individual column changes

This post is long overdue, but since the question keeps popping up on various SharePoint discussion lists, I figured I'd document the answer here (next time I can just post a link instead of typing the whole thing out again).

In a SPD workflow, you cannot trigger a SharePoint workflow when a column changes; you can only use the ItemChanged event.  To get more granular, then, you need to add some extra bits.

Let's say you have a list called "5K Races" with a column called StartTime, and you want to execute some actions when the StartTime value changes.  Simply perform the following steps:

1)  Create an additional column (same datatype) called OldStartTime.

2)  When the workflow starts, compare StartTime to OldStartTime. 

  a) If they are equal, then do nothing (end). 

  b) If they are NOT equal, proceed with your workflow.

3)  If 2b, then set OldStartTime to the value of StartTime.

By performing step 3, you ensure that by the end of the workflow, OldStartTime will be equal to StartTime -- this is important because the workflow will continue to run every time a particular item is changed, but by taking away the criterion that would cause the workflow to run the second time, you have avoided an endless loop situation.

 

2 Comments

  • Hi Wesley,

    My apologies for being unclear. This post was supposed to address SharePoint Designer workflows, but I dashed it off in a hurry and apparently left out something important. I have since added a bit more detail to the title and the initial problem statement.

    Cheers,

    Peter

  • Thanks Peter, such a simple workaround

Comments have been disabled for this content.