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 the date and time field for one year?

Sri56
Tera Contributor

Hi All,

 

I have one field 'xyz' which is date/time field.

I need to validate this field that it should not exceed one year

i.e, if today is 03/11/2024 , the field value can be any date before 01/11/2025 . it should show an error message/ abort the action of showing the value.

 

Please help me with the ui policy?

 

Thanks,

Sri

1 ACCEPTED SOLUTION

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Sri56 

 

Use UI policy

 

I added create date

 

AGLearnNGrow_0-1710153371189.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

View solution in original post

2 REPLIES 2

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Sri56 

 

Use UI policy

 

I added create date

 

AGLearnNGrow_0-1710153371189.png

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Sohail Khilji
Kilo Patron

Hi @Sri56 ,

 

As suggested by @Dr Atul G- LNG  create a simple UI policy. That will do the low code job..


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

LinkedIn - Lets Connect