Service catalog UI policy
Summarize
Summary of Service catalog UI policy
Service catalog UI policies control the behavior and appearance of catalog item forms presented to users in the ServiceNow service catalog. They enable you to define custom process flows and apply dynamic form rules for catalog items or variable sets, enhancing the user experience during service requests.
Show less
Key Features
- Scope: Catalog UI policies apply either to specific catalog items or to all items using a particular variable set.
- Variable Constraints: Policies can only reference variables defined in the targeted catalog item or variable set. Variables must be visible on the form (even if hidden or read-only) and have names for conditions to be evaluated correctly.
- Variable Types Limitations: Mandatory and Read Only actions do not apply to Break, Container Split, Container End, UI Macro, UI Macro with Label, Label, and UI Page variable types. The Set Visible action does not apply to Break, Container Split, and Container End types.
- Application Context: Policies apply not only in the service catalog ordering interface but also when variables appear on Requested Item or Catalog Task forms.
- Actions on Variable Sets: Actions applied to a variable set affect all variables within it. When conflicting actions exist between a variable and its variable set, the action with the higher priority (lowest order) takes effect.
- Priority of UI Actions: Mandatory has the highest priority, followed by Read Only and then Display. For example, a variable set to mandatory overrides read-only or hidden states, ensuring visibility and data entry.
- Visibility and Editability Rules: Setting a variable as mandatory will make it visible and editable even if previously hidden or read-only. Containers or variable sets with mandatory variables cannot be hidden.
- Wizard Compatibility: UI policies are supported for catalog items viewed in the service catalog wizard interface.
- Override Behavior: By default, catalog item UI policies take precedence over variable set UI policies. This behavior can be modified by changing the system property
glide.sc.uipolicy.variablesetrunfirst.
Practical Application
ServiceNow customers can leverage catalog UI policies to create dynamic, user-friendly service catalog forms that enforce data requirements and control form behavior based on user inputs. Proper use of these policies ensures that mandatory fields are completed, unnecessary fields are hidden or read-only, and the overall request process is streamlined for end users.
When creating catalog UI policies, ensure variables are correctly defined and visible on forms, understand the priority of UI actions to avoid conflicts, and be aware of limitations with specific variable types for mandatory, read-only, and visibility settings.
Next Steps
To implement catalog UI policies, create them targeting specific catalog items or variable sets and configure conditions and actions based on your service catalog requirements. For advanced behavior, consider modifying system properties to adjust policy precedence as needed.
UI policies can be used to define custom process flows for tasks.
Catalog UI policies control the behavior of catalog item forms when presented to your users. Catalog UI policies can be applied to a catalog item or a variable set.
UI policies are useful when applied to service catalog items. Keep the following points in mind when creating service catalog UI policies:
- A catalog UI policy applies to either a specific catalog item or any item that uses a specific variable set.
- A catalog UI policy can only contain and reference variables that are defined for the catalog item or variable set.
- Like UI policy conditions, the variables in a service catalog UI policy condition must be visible (even if hidden by UI policy or read-only) on the form for the condition to be tested. Also, ensure that the variables have names. For more information, see Create a catalog client script.
- Limited UI policy functionality applies to following variables:
- The Mandatory and Read Only policy do not apply to the following variable types: Break, Container Split, Container End, UI Macro, UI Macro with Label, Label, UI Page.
- The Set visible policy does not apply to the following variable types: Break, Container Split, Container End.
- Service catalog UI policies are applied to variables and variable sets of catalog items
ordered in the service catalog. Policies can also be applied when the variables are
present in a Requested Item or Catalog Task form.Note:The Clear the variable value UI policy action is not applicable on variable sets and containers.
- Catalog UI policy actions can be applied on a variable set. The actions on a variable set are applied on all variables within the variable set. If different catalog UI policy actions are applied on a variable or a variable set, the action with the lowest order is considered.
- The priority order for UI actions types is:
- Mandatory (highest)
- ReadOnly/Display
If a variable is set to mandatory and does not have value, readonly or hide do not work on that variable. If a variable is hidden or readonly, and then set to mandatory, the variable field becomes visible or editable.
This priority order is also applicable for variable sets and containers. If a variable set or container has a mandatory variable without any value, then the container or variable set cannot be hidden.
- Catalog UI policies are supported for catalog items viewed in a service catalog
wizard.Note:The UI policy for catalog items always takes precedence over UI policy for variable sets. You can change this behavior by editing the glide.sc.ui_policy.variable_set_run_first property.