Run if people picker field or date changes

  • 20 January 2016
  • 2 replies

Userlevel 5
Badge +13

We're working on a project management solution in which each project will have it's own site on which there will be a task list with the "sub-tasks" of that project. Each of these sub-tasks will be assigned to a person in our team. What we're trying to accomplish, is to have the workflow email the original assignee if the assignee changes. Meaning, if Frank is assigned a project, then the lead decides that Martha would be a better "fit" to complete the task or whatever, and they change it to Martha, Frank gets an email that he's no longer assigned the task and Martha gets an email that she has a new task.


In that same vein, if Frank is assigned a task and the due-date of that task is changed, we want Frank to get an email with the new due date of that task. The problem is that once the field is changed, the previous value is "lost". We tried having the assigned person field write to a variable, but unless you can pause until a change or there's a way to get variables "cross-workflow" that won't work.


Any ideas? What are we missing here? We really don't want to have a "previous assignee" field on the form that users are responsible for filling out since that's really clunky and too error-prone.


Best answer by jesse_mchargue 17 February 2016, 20:30

View original

2 replies

Userlevel 5
Badge +13

Hi Courtney,

My first thought is to create two new list columns (maybe "Previous Assignee" and "Previous Due Date") to store the value of the previous assignee and previous due date.  The workflow that runs on item creation could write the value of the current Assignee/Due Date to the new columns, which are empty to begin with.  On an item modification, the workflow could then compare the value of the current Assignee/Due Date fields with the value of the previous Assignee/Due Date fields and continue if they are different.  At the end of the modification scenario, the workflow writes the new values for current Assignee/Date to the previous Assignee/Due Date fields.

I know you said you didn't want to use a "previous value" field that the user fills out, but this way you could have the workflow handle the process of updating the previous fields.

Userlevel 6
Badge +12

Also, the "Previous" fields do not have to be touched by the users. You can handle the update of those fields within the workflow and then hide the controls from the form itself.

Also, you could use the conditional startup options and use previous values to determine whether or not to run the workflow. For example, you can look at who modified the item, and if it is not the same user as the last person that modified it, start the workflow:

You can use any of your list columns to compare against its previous value without having to add in an extra column to store it.

Hope this helps!