Generate a catalog task based on a specific variable date

BasavaK
Tera Contributor

 I have a catalog item that has a variable that is a date and time field named Termination Date
many tasks will be created after the form is submitted but there is a task named final day i want that task to be created on the date that has been given in the field named Termination Date
How to achieve this we are using Workflow  

2 REPLIES 2

nirmal12720
Tera Contributor

Hi Basava,

 

What you can do is to have a Timer activity and have the 'Timer based on' 'Script'.

 

Script will be something like:

 

answer = 0;

 

var gdt = new GlideDateTime();

 

//date is the field name of the Date variable

 

gdt.setDisplayValue(current.variable_pool.date.getDisplayValue());

 

var start = gdt.getNumericValue();

 

var currentDate = new GlideDateTime();

 

var currentSeconds = currentDate.getNumericValue();

 

answer = ((start - currentSeconds)/1000);

 

 

 

So, now the Timer will wait till that date and then Workflow will create the Catalog Task

Najmuddin Mohd
Mega Sage

HI @BasavaK ,

There is a OOB Field Due date of RITM, in your flow you can map the Termination date to Due date and Use Timer to wait the flow until due date.




NajmuddinMohd_1-1731661709444.png

 

NajmuddinMohd_2-1731661732003.png

NajmuddinMohd_3-1731661840804.png


If the above information helps you, Kindly mark it as Helpful and Accept the solution.
Regards,
Najmuddin.