Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Override Variable Set mandatory field on a specific Catalog Item without touching the Variable Set

vivek11
Tera Contributor

Hi community,

I have a specific Catalog Item that includes two Variable Sets: "software" and "business justification".
The variable inside the "business justification" Variable Set is set to mandatory. I need to make this variable non-mandatory (optional), but only for this one specific Catalog Item. Crucially, I cannot modify either of the Variable Sets or their existing configurations.
What I have tried (and has NOT worked):
1. onSubmit Client Script: Tried using g_form.setMandatory on the Catalog Item, but native validation blocks the submission before it completes.
2. onLoad Client Script: Created an onLoad script on the Catalog Item to set mandatory to false. The field still shows as mandatory.
3. Catalog UI Policy: Created an item-level UI Policy (with no conditions) to set the variable to Mandatory = False. It still remains mandatory on the form.
It seems the Variable Set's configuration is strictly overriding my Catalog Item-level attempts. How can I force this variable to be optional without touching the Variable Set itself? Any advice is appreciated!


Thank you

0 REPLIES 0