Set default date for Date field in a Catalog

Abhi369
Tera Contributor

I have a Date variable in a ServiceNow Catalog.

The Date field is at question number 7 and I want to set it's value based on question 1.

I want to set its value to 4 weeks ahead from the current date based on some condition which are selected in the previous question i.e. Q1.

 

I was thinking of using OnChange Catalog Client Script and GlideAjax() on "

ClientDateTimeUtils" but couldn't reach to the solution.

 

Please help me in finding the solution.

 

Thank you!

6 REPLIES 6

Hello Abhi,

 

use this :-

 

gs.daysAgo(-28);

 

Plz Mark my Solution as Accept, if you find it helpful.

 

Regards,

Samaksh

Hello Abhi,

 

Can you plz mark my response as Accept, If you find my solution helpful.

 

Regards,
Samaksh