You are on page 1of 10

Quebec Now Platform Administration

Quebec Now Platform


Administration
Last updated: June 26, 2021

PDF generated on June 26, 2021


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement
ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in
the United States and/or other countries. Other company and product names may be trademarks of the respective companies with which
they are associated.
Quebec Now Platform Administration

Some examples and graphics depicted herein are provided for


illustration only. No real association or connection to ServiceNow
products or services is intended or should be inferred.
This PDF was created from content on docs.servicenow.com. The web
site is updated frequently. For the most current ServiceNow product
documentation, go to docs.servicenow.com.
If you have comments about this documentation, submit your feedback
to: docfeedback@servicenow.com

Company Headquarters
2225 Lawson Lane
Santa Clara, CA 95054
United States
(408)501-8550

PDF generated on June 26, 2021 2


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

UI policies
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

Role required: ui_policy_admin

About this task

A UI policy condition evaluates all fields even if they are not visible on the form. This
function removes the requirement that a field must be on a form for it to be evaluated.
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.

• UI Policies also apply to forms and lists displayed within Content Management
System application.

Procedure

1. Navigate to System UI > UI Policies.

2. Click New.

PDF generated on June 26, 2021 3


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

The UI Policy [Advanced view] form opens

3. 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.
UI policy fields

Field Description

Table The table for the form to be modified.

The active status of the UI policy. Only


Active
active UI policies are applied.

Short description Short summary of the UI policy.

The processing sequence, from the


lowest to highest number. If two policies
conflict, the UI policy with the higher
number executes.

Order [Advanced view] For inherited UI policies, the extended


(child) table's UI policies are executed
first. Then the base table UI policies are
executed; both from lowest to highest
specified value.

When to Apply

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
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.

PDF generated on June 26, 2021 4


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

Field Description

Option for specifying whether the UI


policy applies to all form views. If this
check box is cleared, the UI policy is
view-specific.

By default, the Global UI policy applies


Global [Advanced view]
to all form views. However, a UI policy
can be specific to a view. For example,
you can define a UI policy for only the itil
view of a form. Use the View field to
accomplish this.

Option for indicating which form view


the UI policy applies to. This field is visible
only if Global is not selected. If Global is
View [Advanced view] not selected and the View field is left
blank, the script applies the default
view. For more information on form
views, see View management.

Option for specifying that the UI policy


action should be reversed when the
conditions of its UI policy evaluate to
Reverse if false [Advanced view] 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 should be performed OnLoad
as well as when the form changes.
You can check or clear the On load
check box in a UI policy to control
whether it runs every time a form is
loaded when the conditions are
satisfied. In this example, an
administrator does not want an incident
to enter the Awaiting user info state
unless the user provides an explanation
to the customer. The administrator

PDF generated on June 26, 2021 5


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

Field Description
creates a UI policy with the following
settings.

• In the When to Apply section, adds


the condition [State] [is] [Awaiting
user info] and clears the On load
check box. This condition means
that the UI policy applies only when
the state is changed to Awaiting
user info.

• In the UI Policy Actions related list,


creates a record that makes the
Additional comments field
mandatory when the condition is
met.

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

PDF generated on June 26, 2021 6


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

Field Description
UI policy runs. When the conditions
are met, the Urgency field is hidden.

Script

Option for specifying whether


Run scripts [Advanced view] advanced behavior can be scripted for
both true and false conditions.

A script that executes when the


conditions of the UI policy are fulfilled.
Execute if true [Advanced view]
This field is available only if Run scripts is
selected.

A script that executes if the conditions of


the UI policy are not fulfilled and the
Execute if false [Advanced view] Reverse if false option is selected. This
field is available only if Run scripts is
selected.

Other fields

The UI type for this UI policy: Desktop,


Run scripts in UI type
Mobile / Service Portal, or Both.

Related List: UI Policy Actions

[read-only] Field the UI policy action


Table
applies to.

Field on the selected table to which the


UI policy performs an action if true.
Note: If the specified field is not
Field name
found on the form, the UI policy
performs the action on the variable
with the same name.

Mandatory Choice list for specifying how the UI


policy affects the mandatory state of
the field. Choices are:

PDF generated on June 26, 2021 7


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

Field Description
• Leave alone

• True

• False

Choice list for specifying how the UI


policy affects the visible state of the
field. Choices are:

Visible • Leave alone

• True

• False

Choice list for specifying how the UI


policy affects the read-only state of the
field. Choices are:

Read only • Leave alone

• True

• False

Related Links

Changes the form view to the default or


Default view or Advanced view advanced view. The fields change
based on the view.

5. Click Submit.

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

Role required: ui_policy_admin

PDF generated on June 26, 2021 8


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

About this task

This example demonstrates how to implement the following controls.

• 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

1. Navigate to System UI > UI Policies.

2. Click New.

3. Supply the following information.


New UI policy

Name Input

Table Incident

Conditions [Incident state] [is] [Resolved]

Select this check box. If the incident


Reverse if false state is not Resolved, the UI policy is
reversed.

Select this check box to perform the


On load actions when the form is loaded or
when the condition changes.

4. Right-click the form header and select Save from the context menu.
The UI Policy Actions related list appears.

5. In the related list, click New.

6. Provide the following information.

PDF generated on June 26, 2021 9


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.
Quebec Now Platform Administration

New UI policy actions

Name Input

Close notes. This UI action makes the


Field name
Close notes field mandatory.

Mandatory True

Visible Leave alone

Read Only Leave alone

7. Click Submit.

8. Repeat the process to create UI policy actions to hide the Opened by field, and to
make the Priority, Severity, and Urgency fields read-only.

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.

For example, to display an alert to the user when the incident State field changes to
Resolved, create the following script in the Execute if true field.
function onCondition(){
alert('You changed the "Incident state" to Resolved. Please enter you
r comments in the "Close notes" field.');
}

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

PDF generated on June 26, 2021 10


©2021 ServiceNow. All rights reserved. Terms of Use Privacy Statement

ServiceNow, the ServiceNow logo, Now, and other ServiceNow marks are trademarks and/or registered trademarks of ServiceNow, Inc., in the
United States and/or other countries. Other company and product names may be trademarks of the respective companies with which they are
associated.

You might also like