Only current and future dates are select .show error message if past date is selected

PK42
Tera Contributor

Hi everyone,
Create a variable named as "start date" in any catalog item and mandate the variable.

and it accepts only current and future dates not past dates. if we select past date it should clear the date and populate error message.

 let me know best solution and remember that I'm a beginner in ServiceNow

1 ACCEPTED SOLUTION

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @PK42 

 

You can use the catalog UI policy for this , 

 

AGLearnNGrow_0-1736364048060.png

 

and then in script section add the code

AGLearnNGrow_1-1736364130537.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

1 REPLY 1

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @PK42 

 

You can use the catalog UI policy for this , 

 

AGLearnNGrow_0-1736364048060.png

 

and then in script section add the code

AGLearnNGrow_1-1736364130537.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]

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