Generate a task based on a specific variable date

Cupcake
Mega Guru

I want to know if it is possible to generate a task based on the date of a variable. If this is not feasible or there are many risks, could someone offer a solution based on this need.

So I have a catalog item that has a variable that is a date field. The way that I want this workflow to work is:

a. Customer submits the form,

b. All approvals go through,

c. An email goes to the customer letting them know that the access has been granted.

d. Once all tasks have been completed, I want the workflow to stop & wait but not close the RITM because the variable that is a date field I want a task to generate when that date has been reached

find_real_file.png

find_real_file.png

 

Any assistance would be much appreciated.

Thank you,

Karen

1 ACCEPTED SOLUTION

Mike Patel
Tera Sage

You can do something like below. add timer after wait for task timer

Timer

Name: Wait for End date

Time based on: Script

Script:

var endDate = current.variables.end.getDisplayValue();
answer = gs.dateDiff(gs.nowDateTime(), endDate, true);

View solution in original post

15 REPLIES 15

Mike Patel
Tera Sage

You can do something like below. add timer after wait for task timer

Timer

Name: Wait for End date

Time based on: Script

Script:

var endDate = current.variables.end.getDisplayValue();
answer = gs.dateDiff(gs.nowDateTime(), endDate, true);

Thank you Mike.

     I will look into this as well as soon I obtain final requirements from the customer.

 

Enjoy your weekend.

Karen

Mike,

 

I have the same requirement but when I put in your script it didn't work.  Can you help?

 

Thanks,

John

Is your workflow in scoped app?