Past date limitation

abhisek
Tera Contributor

I have a date variable on a catalog item form. User will manually select the date.

I have to set limitation on past date.

Can anyone please help me out.

Thanks in advance.

17 REPLIES 17

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @abhisek  

 

You can create Catalog UI policy

AGLearnNGrow_0-1711702387493.png

 

 

Show message in SCript

AGLearnNGrow_1-1711702416494.png

 

and write for false as well.

*************************************************************************************************************
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]

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

Hi @Dr Atul G- LNG 

Thanks for your reply. Using your suggestion, I am getting the alert, but user is able to select the past date and submit a request. 

User should not be able to select the past date.

Add clear the value as well in the alert.

 

https://www.servicenow.com/community/developer-forum/ui-policy-clear-date-variable-if-value-incorrec...

 

https://www.servicenow.com/community/developer-forum/how-to-clear-field-value-using-ui-policy/m-p/15...

 

*************************************************************************************************************
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]

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

I have tried with clear value, but the issue is:

If I am raising a request using today's date it is working fine for today but tomorrow it will clear the date field value which was set as today's date.