
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 10:03 AM
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.
Script:
answer = gs.dateDiff(gs.nowDateTime(), current.variables.end_date_change1.getDisplayValue(), true);
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 11:56 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 10:26 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 10:40 AM
I don't fully understand your suggestion. I read online that timer will be a good solution approach.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 10:43 AM
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-16-2018 11:56 AM
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