Flow designer - date

harry24
Tera Contributor

Hello ,

 

I am trying to use GlideDate() in flow designer to set date value which should add 3 days to it , but when I run flow it gives me error GlideDate not defined . Tried with GlideDateTime as well it also gives the same error

3 REPLIES 3

Riya Verma
Kilo Sage
Kilo Sage

Hi @harry24 ,

 

Hope you are doing great.

 

To add glide date logic, Add a Script step to your flow and within the Script step, use JavaScript code to perform the date manipulation.

Please find below code for reference:

 

// Get the current date
var currentDate = new Date();

// Add three days to the current date
currentDate.setDate(currentDate.getDate() + 3);

// Set the resulting date value to a variable or field within your flow
var updatedDate = currentDate.toISOString(); // Adjust the format as per your requirement

// Output the updated date for further usage within your flow
updatedDate;
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

Their is no option to script directly , what you have mentioned is for workflow 

Hi @harry24 ,

 

Hope you are doing great. 

 

You can create custom action in flow designer. 

For reference , please look into video :https://www.youtube.com/watch?v=RMz_hYZXppc

In this video , it is explained how to create custom action and use in flow designer.

Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma
Hi All, Hope you are doing fine. In this tutorial, we will look into ServiceNow custom action in flow designer. This is the third chapter of the ServiceNow Flow Designer Series. In this ServiceNow tutorial, we will try to understand - What is ServiceNow flow Designer - What is Actions in ...