UI policies
-
- UpdatedFeb 1, 2024
- 6 minutes to read
- Washington DC
- Form Administration
UI policies dynamically change the behavior of information on a form and control custom process flows for tasks.
For example, you can use UI policies to make the number field on a form read-only, make the short description field mandatory, and hide other fields. Basic UI policies do not require any scripting, however for more advanced actions, use the Run scripts option.
You can also use client scripts to perform all of these actions, but for faster load times use UI policies when possible.
Create a UI policy
Create a UI policy to define custom process flows for tasks.
Before you begin
About this task
- Policies carried over from versions prior to Fuji are evaluated differently. Fields that previously were not evaluated are evaluated.
- UI policies are not supported on search screens.
- UI Policies also apply to forms and lists displayed within Content Management System application.
Procedure
Example: creating a UI policy
Create a UI policy to implement controls in the Incident form when the state changes to Resolved.
Before you begin
About this task
- Make a Close Notes field mandatory.
- Hide the Opened by field.
- Make the Priority, Severity, and Urgency fields read-only.
- Run a client script that displays an alert message.
Procedure
Client scripts for UI policies
Any scripts you create for UI policies run on the client side.
You can use different options in the UI Policy form to control when and how the UI policy is applied. These options include client scripts, OnLoad execution, and view-specific UI policies. Administrators can use the UI Policy form to create client scripts that run onChange when the UI policy conditions are met (Execute if true) or not met (Execute if false).To display these scripting fields in the UI Policy form, in the Script section, select the Run scripts check box.
Service catalog UI policies control the behavior of catalog item forms. Service catalog UI policies can be applied to a catalog item or a variable set. For more information about using UI policies for service catalog items, see Service catalog UI policy