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

Refreshing Pause Until Value if underlying field has changed

Jump to solution

I have a WF that pauses until the due date field and then sends out an email and updates the task status.  Works great....except if a user decides to change the due date which is permissible.  My issue is that even though the Pause Until is linked to a Look Up field called the Due Date the Pause Until value does not change with the new due date value until a subsequent modification is done in the list to another field.

My assumption is that the Pause Until does not change immediately since the new due date value has not been committed to the list yet.  When a subsequent change is made on another field the due date field has the new value available and thus the Pause Until event reflects the new date done 2 modifications ago.

Obviously I can not depend on a subsequent modification to update my Pause Until event.  Any suggestions ?  Note the WF is set to run when a Modification is done...thx

Labels: (1)
0 Kudos
Reply
10 Replies
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

Hi

I think you will have a safer approach doing this with a site workflow and scheduling it to run daily.  I have written a blog on these here:  ‌ which should give you an idea of how you might achieve the same thing.

Let me know if you need any help changing your approach.

Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

Hello,

Just to clarify, are you saying the user changes the date and saves the item.   At this point the pause until doesn't pick up the change?  Next the user has to come into the form again, makes another change, and saves the item again, and this is when it picks up the date?

Just want to be clear on what's happening.

Thanks,
Mike

Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

That is correct.  User changes due date and the Pause Until reflects the previous due date.  I f a subsequent change is made to another field in the list then the Pause Until will reflect the due date done in the prior modification.

0 Kudos
Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

Hi Cassy,  I definitely thought about that when I first started the workflows.  That makes a ton of sense.  However, my reservation in doing this initially was I would need to query the entire list, set variables, and iterate thru the list which seemed at the time to be over-complicating the requirement.  However, now I am thinking my initial thought and your suggestion is a good idea.  

Can you give me a high level idea of this approach.  I have done looping, setting variables, etc. before.. I just want to make sure if I do a site workflow I do it an a efficient manner.

thanks !

0 Kudos
Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

So if you want to notify them on the due date here is what you would typically do (although my blog goes into much more detail):

  1. Query your list and add a filter where due date = Common:Current Date (that is the common tab using workflow context information such as current date), choose to return ID into a collection variable.
  2. Your collection variable will have none or more IDs in it.
  3. You then do a for each ID in the collection variable
  4. Inside your for each, you take the current ID in the loop and re-query the list where ID = current ID and pull back the information you need (i.e. assigned to, task name etc) into variables
  5. Still in your for each you send an email to the assigned to variable with the details you require
  6. Schedule your workflow to run daily indefinitely

That is it in very simple terms.  Have a look at the blog and see if you can make it work.

If not, see how far you get and send me info on where you are stuck on here.

NOTE:  I am off to InspireX in the morning and won't be back online for around a week.

0 Kudos
Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

Hi Cassy...I took a log at your blog at like your approach.  I am horrified though that a site WF I created 6 months ago I created a collection field for each field in the initial query (prior to the For Each).  Then within the For Each I set each of the collection variables to a variable of its expected type, then sent out an email and did a Create Item.  

Thru looking at your blog and additional research I realized I only need a collection of each individual list item only if I need to build up (aggregate) the records in a single email via a build string.  I had no idea that if I wanted to send individual emails based on a single record I could do a query within the ForEach.  

It would have saved me a lot of time from creating 15 collection variables.  As once I verify the item is for today and done I send an email AND also create a new task (Create Item) for the next due date.  Obviously to complete the Create Item I need the WF variables which for me came from a collection variable and then a standard variable.  All along I could have got them from a second query as illustrated in your blog.  Enjoy InspireX.  I will leave this open until you get back.

I learned a lot from your post.  Thank you.

Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

No worries so are you sorted now?

Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

Could you please how should I refresh my Pause until date if the underlying date field is a user input date field which the user can change at a later time.

Now the Pause until date has to be recalculated based on the new date field.

Any hint to implement this logic?

0 Kudos
Reply
Workflow Hero

Re: Refreshing Pause Until Value if underlying field has changed

Jump to solution

Exactly this is what is my problem. This seems to be a long time back discussion.Has anyone got any workaround to achieve this.If so please share.

0 Kudos
Reply