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.

Require checkbox under label when checkbox hidden with UI policy

McGuire6799
Tera Contributor

Hello-

I have a label variable with 6 checkbox variables underneath that are visible once a user selects their application they are requesting access to, in this case Trackwise, and I would like to make 1 required. The checkboxes have a list collector and select box that are underneath them and visible when selected via catalog ui policy.

 

If I set the label as mandatory, it requires the first checkbox to be true.

If I set the first checkbox under the label as mandatory, it is now always visible regardless of what I set in the catalog ui policy.

 

I have tried an onSubmit script (attached) that doesn't error and allows the user to add the item to their cart and order the cart without anything selected. 

 

Am I missing something in my script that I am overlooking? Am I overly complicating this? I can provide additional screenshots of the catalog item in reference if needed.

 

Thank you in advance.

0 REPLIES 0