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.

How to validate valid to date not more than 1 year

Ramu8
Tera Expert

How to validate the 'valid to' field date that shouldn't be set greater than one (1) year in advance

 

 

Ramu8_1-1715706152660.png

 

3 REPLIES 3

SAI VENKATESH
Kilo Patron
Kilo Patron

Hi @Ramu8 

To validate that,

you can just do it with UI policy as below

Condition as below:

 

 

ca90.pngca91.png

 

Thanks and Regards

Sai Venkatesh

Hi  Sai Venkatesh,

 

Thanks for your quick responce but when i try to below as per above ui policy

Ramu8_0-1715779282683.png

 

Ramu8_1-1715779319272.png

Ramu8_3-1715779522080.png

 

it is not working, it is throwing an error even for when we select tomorrow date as shown below

please find screenshot

Ramu8_2-1715779432669.png

please advice exact condition that so that valid to date can be filled with less than or equal to 1 year

Hi @SAI VENKATESH 

 

Please advice below 

 

My requirement is to autopopulate 1 year future date from today as well user should not select more than 1  year date from today