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.

Date Field On change CS

servicenow14710
Tera Expert

Hello developers,

 

I need to implement a scenario where user has to select a date range which is dependent on custom field from custom table(lets say it has values 1, 2, 3 etc. so on). If user selects 1 then Date field on UI has to enable to select one month back from today.

If user selects 2 then date field should enable to select two months back from today.

 

Please suggest the logic, Any suggestion is appreciated,

Thanks!

USER DATE 

1 REPLY 1

Amit Verma
Kilo Patron
Kilo Patron

Hi @servicenow14710 

 

You should give it a try with the UI Policies instead of Client Script. Refer below posts and give it a try :

https://www.servicenow.com/community/virtual-agent-forum/how-to-restrict-the-date-variable-in-a-cata...

https://www.servicenow.com/community/developer-forum/restrict-user-to-select-past-date-in-catalog-it...

 

Thanks and Regards

Amit Verma


Please mark this response as correct and helpful if it assisted you with your question.