I have date field in a Catalog item form i want to auto populate the Sys date how is it possible

kranthi2
Tera Expert

Hi,

I have date field in a Catalog item form i want to auto populate the Sys date how is it possible.

 

Please help me out with the configuration steps for the same.

 

kranthi2_0-1701699570371.png

 

Thanks

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@kranthi2 

you want to auto-populate today's date as default value?

if yes then add this in the default value

javascript: new GlideDateTime().getLocalDate();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@kranthi2 

you want to auto-populate today's date as default value?

if yes then add this in the default value

javascript: new GlideDateTime().getLocalDate();

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

shloke04
Kilo Patron

Hi @kranthi2 ,

 

Update the default value of your variable as below:

 

 

javascript: new GlideDateTime().getDate()

 

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke