1

I have the following Edit Item workflow set up on a list :

enter image description here

Where I need New Review Date to be updated to a year from today each time an item is edited. However, when I edit an item which already has this workflow running on it, a new instance of the workflow does not overwrite the current one.

I proved this by first creating an item, then approving it (which kicks off the edit item workflow), and then editing the item.

I can see that after editing the item, the workflow's Start Time has not changed, so it is still waiting for the initial edit's New review Date rather than overwriting the currently running workflow.

Is there a way of overwriting the currently running workflow each time an item is edited?

1

From what I know this can't be completed using a designer workflow. I could be wrong but I'm pretty sure. What I was able to do to get around this is create a C# timer job that was installed as a WSP in CA. The timer job would run on the libraries location and look at the value specified and take action from there.

Any reason why you are using a workflow to do that calculation? I would do this in a calculated column and then evaluate that output. I stay away from doing math in workflows because I have to reproduce the workflow if edit needs to be made. Here is the formula for the calc column. =DATE(YEAR([Start Time])+1,MONTH([Start Time])+0,DAY([Start Time])+0)

I would then write a timer job that would look at that value every hour or so and complete action on that. Please see https://msdn.microsoft.com/en-us/library/office/hh528519(v=office.14).aspx it should help.

  • Hi Kenneth, your Timer Jobs suggestion looks interesting and I will have to have a look at that. In the actual list I am indeed calculating the field at creation, but for testing purposes I've been trying absolutely everything! Thanks for the suggestsions – Bassie May 13 '16 at 11:21
  • Very welcome Bassie. Respond if you run into any snags. – Kenneth Kerr May 13 '16 at 13:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.