Need to update in Flow Designer the RITM Due to be 5 days after current date

Luis Roman
Kilo Guru

I am using Flow Designer and need to update the Catalog item Request Item (RITM) due date to 5 days after the current date. I use the following script in flow designer and not able to get any date. Can someone provide expert advise to have the script to work correctly.  Your guidance or expertise sharing will be appreciated. 

*
**Access Flow/Action data using the fd_data object. Script must return a value.
**example: var shortDesc = fd_data.trigger.current.short_description;
**return shortDesc;
var gdt = current.due_date.getGlideObject();
gdt.addDays(4);
var DueDate = fd_data.trigger.current.due_date = gdt.add(4);
return DueDate;
*/
find_real_file.png
LLuis Roman - Lockeed Martin 
1 ACCEPTED SOLUTION

OlaN
Giga Sage
Giga Sage

Hi,

Try the following in your script.

var gdt = new GlideDateTime(fd_data.trigger.current.due_date);
gdt.addDays(4);
return gdt;

View solution in original post

3 REPLIES 3

Mahesh23
Mega Sage

Hi,

Try relative operator in condition builder like

Due date is relative 5 days from now.

 

Please mark my response as correct answer or helpful if applicable 

Mahesh probably I was not clear with my question. I need to update the date in flow designer not in report builder. 

Could you see if you can advise me on how to do that. Or maybe show me and example on how to change it in Flow Designer. I am relatively new to Flow designer. Your expert replied will be appreciated. 

OlaN
Giga Sage
Giga Sage

Hi,

Try the following in your script.

var gdt = new GlideDateTime(fd_data.trigger.current.due_date);
gdt.addDays(4);
return gdt;