Timer in workflow based on variable/date does not work.

SNnewbie2
Tera Expert

I added a timer to my workflow to wait until a certain date/hour(variable date called end_of_change in my form) to create the second task. However, once I closed the first task it creates the second one. I want my workflow to wait a determine hour to create the task. I don't see what I am doing wrong.

capture_1.PNG

Script:

answer = gs.dateDiff(gs.nowDateTime(), current.variables.end_date_change1.getDisplayValue(), true);  

capture_3.PNG

1 ACCEPTED SOLUTION

I found a solution. We can use a timer in a workflow.


The following script worked:



answer = gs.dateDiff(gs.nowDateTime(), current.variables.end_date_change.getDisplayValue(), true);  



Thanks


View solution in original post

8 REPLIES 8

Steven G_
Tera Expert

Hi Claudilla,



I think you may need to use the scratchpad for this, I am not very familiar with it but I am grasping at starws here. There may be a difference on how the workflow stores the wait value compared to the date field as a variable


I don't fully understand your suggestion. I read online that timer will be a good solution approach.


The timer function is built in to the workflow, I am not sure if calling the value of a date field will translate the same as the OOb timer function. The scratchpad is a function in the workflow where you can store values from the record producer and call the value back in the workflow activities. here is a small doc on what I have understood Use multiple timer activities in one workflow


I found a solution. We can use a timer in a workflow.


The following script worked:



answer = gs.dateDiff(gs.nowDateTime(), current.variables.end_date_change.getDisplayValue(), true);  



Thanks