Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Autopopulate date field in default value

ARAVINDA11
Tera Contributor

@Ankur Bawiskar @Community Alums @Sohail Khilji 

 

Team please help me how can I autopopulate current date in current date field using reference qualifier default value 

1 ACCEPTED SOLUTION

@ARAVINDA11 ,

 

Did it help ? kindly action in closing your post and quries.


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

View solution in original post

7 REPLIES 7

Vishwa Pandya19
Mega Sage

Hello,

 

Please have a look at below discussion it might be able to help you.

https://www.servicenow.com/community/developer-forum/set-date-field-to-today-s-date-by-default/m-p/1...

 

If my answer has helped you in any way please mark it as correct or helpful.

Ankur Bawiskar
Tera Patron
Tera Patron

@ARAVINDA11 

simply use this in default value, why to use ref qualifier?

javascript: new GlideDateTime();

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

Sohail Khilji
Kilo Patron

Hi @ARAVINDA11 ,

 

 

You don't need to use reference qualifier for setting default field value. 

 

Just right click on the field > select configure dictionary.

 

In the Default value section enter the below code:

 

javascript <colon> new GlideDateTime(); // replace <colon> with colon symbol (:)


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

@ARAVINDA11 ,

 

Did it help ? kindly action in closing your post and quries.


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect