Catalog UI Policy Precedence and Service Portal BehaviorIssue <!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } 1. Catalog UI Policy Overview Catalog UI Policies apply to either: A specific Catalog Item, orAny Catalog Item that uses a specific Variable Set A UI Policy may reference only those variables defined on the associated Catalog Item or Variable Set. UI Policies can modify variable properties, such as visibility, mandatory status, and read-only status, using UI Policy Actions or Client Scripts. 2. UI Policy Execution Order and Precedence Multiple UI Policies may apply to a single Catalog Item, including policies inherited from Variable Sets. When multiple policies affect the same variable, the final behavior is determined by execution order and policy type. 2.1 Order Field Each UI Policy includes an Order field. Policies with lower numeric values run first; policies with higher values run later. The last policy to run determines the final state of the affected variables. 2.2 Catalog Item vs. Variable Set Precedence Execution precedence between policy types is fixed: Variable Set UI Policies run firstCatalog Item UI Policies run second As a result, Catalog Item UI Policies always take precedence over Variable Set UI Policies, regardless of the Order field. 2.3 Exception: System Property Override If the system property glide.sc.ui_policiy.variable_set_run_first is set to false, the execution order is reversed: Catalog Item UI Policies run firstVariable Set UI Policies run second and therefore take precedence 2.4 Conflict Resolution Conflicts between a Catalog Item UI Policy and a Variable Set UI Policy cannot be resolved by adjusting the Order field. The Order field only affects policies of the same type. 3. Common Symptoms of UI Policy Conflicts Administrators may observe the following behaviors: A variable displays an unexpected valueA variable property (visibility, read-only, mandatory) does not match the intended configuration These symptoms typically occur because the last executed UI Policy determines the final outcome. This is an example illustrating how UI policy works in Service Portal - UI Policies Not Triggering After Save in Service Portal When using the sp-variable-editor widget, Catalog UI Policies and Catalog Client Scripts may not re-run after clicking the Save button. This section describes the issue, reproduction steps, and a supported workaround. After saving variable data in the Service Portal using the sp-variable-editor widget, UI Policies and Client Scripts do not automatically re-evaluate. As a result, variable visibility or other properties may not reflect the expected UI Policy logic until the page is refreshed. 1. Steps to Reproduce Create a Service Portal page and add the sp-variable-editor widget.Create a Catalog Item with two variables (e.g., a Yes/No select box and a text field).Configure a Catalog UI Policy that hides the second variable unless the first variable is set to "Yes".Test the Catalog Item; the UI Policy behaves as expected.Open the RITM in the Service Portal using the sp-variable-editor widget.Click Save.UI Policies no longer run; the second variable becomes visible regardless of the first variable's value.Refresh the page; UI Policies function correctly again. 2. Cause The Save action in the sp-variable-editor widget does not trigger a UI Policy re-evaluation event. As a result, UI Policies and Client Scripts do not execute after saving variable data. 3. Workaround To ensure UI Policies re-run after saving: Open the Form widget (sp_widget.do?sys_id=fd1f4ec347730200ba13a5554ee490c0).Create a new Widget Dependency.Add a JS Include under the dependency.Create a new UI Script and paste the contents of the provided workaround file (workaround2-kp3.js.txt).Clone the sp-variable-editor widget.Add the new widget dependency to the cloned widget.In the cloned widget's Client Controller, add the following line after line 40:$rootScope.$emit("sp.form.record.updated");This event triggers a re-evaluation of the UI Policy after the Save action. Release<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } All the versions included Resolution<!-- /*NS Branding Styles*/ --> .ns-kb-css-body-editor-container { p { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } span { font-size: 12pt; font-family: Lato; color: var(--now-color--text-primary, #000000); } h2 { font-size: 24pt; font-family: Lato; color: var(--now-color--text-primary, black); } h3 { font-size: 18pt; font-family: Lato; color: var(--now-color--text-primary, black); } h4 { font-size: 14pt; font-family: Lato; color: var(--now-color--text-primary, black); } a { font-size: 12pt; font-family: Lato; color: var(--now-color--link-primary, #00718F); } a:hover { font-size: 12pt; color: var(--now-color--link-primary, #024F69); } a:target { font-size: 12pt; color: var(--now-color--link-primary, #032D42); } a:visited { font-size: 12pt; color: var(--now-color--link-primary, #00718f); } ul { font-size: 12pt; font-family: Lato; } li { font-size: 12pt; font-family: Lato; } img { display: ; max-width: ; width: ; height: ; } } To ensure the correct UI Policy behavior: Review all Catalog Item and Variable Set UI Policies that apply to the itemConfirm that the policy intended to take precedence executes lastAdjust the system property if a different precedence model is required