Restrict user for selecting future dates in Service Catalogue.

akchauhan
Tera Contributor

In ServiceNow, if I would like to display a date variable in a service catalog item and ensure that users cannot select future dates, how I can achieve this .

1 ACCEPTED SOLUTION

Viraj Hudlikar
Giga Sage

Hello @akchauhan 

You can write a simple UI Policy as show below:

VirajHudlikar_0-1738218243141.png

VirajHudlikar_1-1738218262236.png


Output will be as shown below:

VirajHudlikar_2-1738218306537.png

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.

 

View solution in original post

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@akchauhan 

use onchange catalog client script and use this

you need to write validation so that user doesn't select future dates

script based approach here

Restrict the Date field from allowing future dates

UI policy based approach here where I shared solution

Need to restrict future dates in field?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@akchauhan 

As per new community feature you can mark multiple responses as correct.

If my response helped please mark it correct as well so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Viraj Hudlikar
Giga Sage

Hello @akchauhan 

You can write a simple UI Policy as show below:

VirajHudlikar_0-1738218243141.png

VirajHudlikar_1-1738218262236.png


Output will be as shown below:

VirajHudlikar_2-1738218306537.png

 

If my response has helped you hit helpful button and if your concern is solved do mark my response as correct.

 

Thanks & Regards
Viraj Hudlikar.