Variable Set UI Policy Not triggering properly
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
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
yesterday
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
yesterday - last edited yesterday
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
yesterday
Hi @ChrisLawer
- Verify if you've another catalog-specific UI policy in place that might be forcing overriding your current logic.
- Confirm that the internal variable names in the fourth set are unique and not accidentally matching variables reused from the first three sets.
- Verify that the "Reverse if false" checkbox configuration matches the behavior you expect when the trigger question changes back.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti