- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I have a catalog item where I have 4 variable sets in addition to the initial questions on the form. Each set pertains to a different section on the form. In each set the 1st question is set as visible and mandatory. Based on input of the first question I turn on the remaining questions in the set. This works flawlessly in the first 3 variable sets, but on the last variable set when I answer the trigger question only one question displays. The one that triggers is the one that has the lowest order. The rest won't display. They are all initially set to be hidden, and not mandatory. The UI policy is ideally turning them too mandatory and visible.
Thoughts?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thank you to everyone for the suggestions. We found the culprit. For some reason having each variable set be surrounded by Containers was breaking the UI policy for the set. These particular UI policies are set on the Variable set themselves and not on the base catalog item, so I'm not sure why having containers start and end variables was causing a problem for one of the sets.
I removed the containers and everything worked fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ChrisLawer -
Can you try following to instantly see what is overriding your variables:
- Navigate to your Catalog Item in the Service Portal or standard UI.
- Open your browser's Developer Tools (F12) or use the built-in ServiceNow Variable Action Logger (if enabled in your instance).
- Trigger the 4th variable set. The logger will show you the exact sequence of UI Policies and Client Scripts firing. You will likely see your Variable Set UI Policy fire to show the fields, immediately followed by another Policy or Script hiding them again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
When I trigger them with the variable action logger or just in the try it version of screen, the variables show up. When I go to the actual employee center portal we use, they don't show up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago - last edited 3 weeks ago
Hello @ChrisLawer
Since the Catalog Client Scripts and UI Policies work as expected in the classic "Try It" view, the issue is likely related to their configuration set up. Please verify that the UI Type is set to All for all relevant Catalog Client Scripts, and also check any scripts within your UI Policies to ensure they're configured the same way.
I've also attached a screenshot for reference.
Hope this helps!
Thank You!
Juhi Poddar
Juhi Poddar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I don't have any client scripts.