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 restrict Date optionality using a UI policy

Cuber
Tera Contributor

Hi all, 

 

First time posting in this forum. I'm creating an SC Catalog Form and using the "Date" variable. I want to limit or restrict the date options to 1 month from "today's date" (date of the submission of the request). Meaning, I don't want a user to be able to select a date more than 1 month ahead as well as any past dates relative to "today's date" or the date the user is submitting the request. 

 

How can I accomplish this without using a script? I don't seem to have the option of using scripts with my current permissions on our platform. 

 

Thank you

13 REPLIES 13

Hi @Cuber what role do you have in servicenow? only admins can write script

Regards
Harish

Cuber
Tera Contributor

Hi @Harish KM I'm not an admin. It's a kind of Catalog Manager. So, because I'm not able to write scripts, I was looking for a solution I could employ using only UI policies. I did mention this in my original post.

Hi @Cuber I have verified in PDI OOB instance

if you have catalog_manager role, you can write UI Policy script if your the owner of catalog.

HarishKM_2-1712193945020.png

 

HarishKM_0-1712193859979.png

HarishKM_1-1712193874678.png

 

Regards
Harish

Cuber
Tera Contributor

Hi @Harish KM I do have Catalog Manager role, however, I'm not an owner. I don't have the script tab to be able to write scripts. Please advise. thank you

Hi @Cuber when I checked in OOB Instance as a catalog manager i can see the UI Policy script but i cannot select catalog item because there  is a reference qualifier applied on UI policy catalog item field that only catalog owner can select the catalog item now this is OOB instance,

In your instance your able to select catalog item but script section is not visible so I assume there is some customisation done, so I would advise to check with your developer team,

in short as a catalog manager you should be able to see script section .If it is not showing then there is some customisation implemented in your organisation.

Regards
Harish