cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

Update a variable that has already been set on a running workflow

Jump to solution

How can I update a variable once it has been set in a running workflow?

Here is my scenario. Once the Hearing Date is set on the list item, I calculate the days, store it in a workflow variable, pause until that calculated date and send an email.  But what if someone comes in a changes the date on the list item? Is it is possible to reset that variable/date calculation?

Labels: (2)
0 Kudos
Reply
5 Replies
Workflow Hero

Re: Update a variable that has already been set on a running workflow

Jump to solution

could you have a workflow on the list that runs only when hearing date is changed that terminates and restarts the above workflow?

0 Kudos
Reply
Workflow Hero

Re: Update a variable that has already been set on a running workflow

Jump to solution

Unfortunatley there are other steps in the workflow, before and after the snippet I'm showing, that I wouldn't want to re-run. I suppose I could cut this portion out and run it as a separate workflow, however my preference is to do it all in one if the software is capable of that.

0 Kudos
Reply
Workflow Hero

Re: Update a variable that has already been set on a running workflow

Jump to solution

In that case I would take this reminder part out and use a scheduled site workflow to run every day that checks for dates in the next xxx days. I have written a blog post on something similar - see if you think it could fit your requirement?

0 Kudos
Reply
Workflow Hero

Re: Update a variable that has already been set on a running workflow

Jump to solution

You could possibly add a loop that compares the current hearing date to the stored date (store the hearing date in a variable) and triggers a subsequent revisit of the reminder logic if the date has changed. Build in a wait on the loop for whatever period you which to poll the value for. If the change is detected it then performs the calculations again.

Reply
Workflow Hero

Re: Update a variable that has already been set on a running workflow

Jump to solution

Thank you for the tip. I tried this out and it is working great.

0 Kudos
Reply