Create a UI policy

UI policies offer an alternative to client scripts for dynamically changing information on a form. Use UI policies to define custom process flows for tasks.

Before you begin

Role required: ui_policy_admin

About this task

All fields are evaluated by a UI policy condition even if they are not visible on the form (in UI16 and UI15 only). This function removes the requirement that a field must be on a form for it to be evaluated. In UI11, a UI policy condition only evaluates fields that are present on a form. Fields that are not present are not evaluated. For UI11, ensure that any field called by a UI policy exists on the form.
Note:
  • 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.

Procedure

  1. Navigate to System UI > UI Policies.
  2. Click New.
    The UI Policy [Advanced view] form opens
  3. (Optional) To change the view, in Related Links click Default view.
  4. Complete the form, as appropriate.
    You may need to configure the form to see all the fields.
    Table 1. UI policy fields
    Field Description
    Table The table for the form to be modified.
    Active The UI policy active status. Only active UI policies are applied.
    Short description Short summary of the UI policy.
    Order [Advanced view] The processing sequence, from lowest to highest number. If two policies conflict, the UI policy with the higher number is executed.
    When to Apply
    Conditions The conditions which, if fulfilled, cause the UI policy to be applied. Conditions are built with the condition builder. To set conditions using a script, use a client script instead.

    Conditions are only rechecked if a user manually changes a field on a form. If the change is made by a UI action, context menu action, or through the list editor, it is not evaluated.

    In UI11, the field must be on the form to be checked by a UI policy. To test the value of a field but hide it from users, add the field to the form and use UI policies to hide it. This requirement also prevents dot-walked fields from being used as conditions.

    Global [Advanced view] Option for specifying whether the UI policy applies to all form views. If this check box is cleared, the UI policy is view-specific.
    View [Advanced view] Option for indicating which view or views the UI policy applies to. This option is visible only if Global is not selected.
    Reverse if false [Advanced view] Option for specifying that the UI policy action is reversed when its conditions evaluate to false. In other words, when the conditions are true, actions are taken and when they change back to false, the actions are reversed (undone).
    On load [Advanced view] Option for specifying that the UI policy behavior is performed OnLoad as well as when the form changes.
    Inherit [Advanced view] Option for specifying whether extended tables inherit this UI policy.

    When a child table has an inherited UI policy from its parent table, the UI policy on the child table always runs first. This event is true regardless of the Order of the UI policies.

    Consider the following example:
    • A child table has a UI policy with Order value 500 that shows the Urgency field when its conditions are met.
    • Its parent table has a UI policy with the same conditions that hides the Urgency field. The parent table UI policy has Order value 100.
    • Although the parent table Order field has a lower value, the child UI policy runs first and then the parent UI policy runs. When the conditions are met, the Urgency field is hidden.
    Script
    Run scripts [Advanced view] Option for specifying whether advanced behavior can be scripted for both true and false conditions.
    Execute if true [Advanced view] A script that executes if the UI policy conditions are fulfilled. This field is available only if Run scripts is selected.
    Execute if false [Advanced view] A script that executes if the UI policy conditions are not fulfilled. This field is available only if Run scripts is selected.
    Other fields
    Run scripts in UI type The UI type for this UI policy: Desktop, Mobile, or Both.
    Related List: UI Policy Actions
    Table Table the UI policy action executes on.
    Field name Field on the selected table that the UI policy performs an action on if conditions are met.
    Mandatory Choice list for specifying how the UI policy affects the mandatory state of the field. Choices are:
    • Leave alone
    • True
    • False
    Visible Choice list for specifying how the UI policy affects the visible state of the field. Choices are:
    • Leave alone
    • True
    • False
    Read only Choice list for specifying how the UI policy affects the read-only state of the field. Choices are:
    • Leave alone
    • True
    • False
    Related Links
    Default view or Advanced view Changes the form view to the default or advanced view. The fields change based on the view.
  5. Click Submit.