UI interaction toolbox steps
Summarize
Summary of UI interaction toolbox steps
The UI interaction toolbox in ServiceNow allows you to build customized UI interactions by adding steps organized by interaction type: Generic, Form, or List. Each step defines an action or logic that controls the flow and behavior of the interaction. Understanding the available steps and their events enables precise control over user experience and automation within your workspace.
Show less
Available Steps for All Interaction Types
Regardless of the interaction type, you can add these steps:
- Alert: Add alert notifications to the UI with events like alert action selected.
- If/Else Logic: Evaluate conditions to branch execution flow; no return event.
- And Logic: Execute multiple branches in parallel; no return event.
- Server Script: Run server-side scripts requiring user roles, with Success and Error outcomes.
- Navigation Steps: Close workspace tabs, navigate to records, routes, or URLs without return events.
- Modals and Dialogs: Show various modal types (alert, confirm, confirm and destroy, user input) and modeless dialogs, each providing specific user interaction events such as modal closed or button clicked.
- UI Builder Components: Create custom modals or modeless dialogs with definable events.
Steps that do not return success or error events connect directly to the next step or end node. Use an "And" branch to continue building after these steps.
Form Interaction Type Steps
When the UI interaction type is set to Form, additional steps become available that specifically manipulate form data and behavior. These require a form controller on the page.
- Field Actions: Modify individual fields (e.g., add messages, clear values, set validity, update labels, control visibility). These steps do not generate success or error events.
- Form Actions: Operate on the form as a whole, including displaying alerts, executing client scripts or UI actions, refreshing, saving, showing/hiding annotations, submitting, and validating. Many of these steps provide Success and Error events to manage flow based on outcomes.
List Interaction Type Steps
When the UI interaction type is List, steps become available that interact with list data via a list controller on the page:
- Run client scripts with success/error outcomes.
- Group, refresh, set queries, and sort the list without return events, allowing you to control list display and filtering dynamically.
Practical Use for ServiceNow Customers
Using the UI interaction toolbox steps, you can design complex user interactions tailored to your workspace needs. By selecting the correct interaction type, you unlock relevant actions to manipulate forms, lists, or generic UI elements effectively. The availability of events like Success, Error, and specific modal responses allows you to build robust, conditional flows that enhance user guidance, validation, and navigation.
When inserting steps, the toolbox guides you on placement constraints by showing unavailable options with contextual messages, helping avoid configuration errors.
Find details about UI interaction toolbox steps, organized by interaction type, with step descriptions and any available outgoing events. Steps are added to a UI interaction using the toolbox in the UI interaction editor. The available steps depend on the type you selected when you created the UI interaction, whether Generic, Form, or List.
Available for all interaction types
The following steps are available regardless of whether your UI interaction type is Generic, Form, or List.
Steps that show None in the Events column connect directly to the End node or the next step. They execute and do not return a confirmation that they have finished. To continue building the interaction after one of these steps, use an And branch.
Steps that show Success and/or Error events allow you to define what happens next depending on the outcome, giving you full control over the interaction flow.
When you insert a step before an existing step, the toolbox displays an Unavailable section. This section shows items that cannot be inserted at that location and includes a contextual message that changes depending on why the items are unavailable.
| Step | Category | Description | Events |
|---|---|---|---|
| Add alert notification | Alert | Adds an alert notification banner to the UI. | Alert action selected |
| If/Else | Logic | Evaluates conditions to branch the interaction flow. Branches evaluate top to bottom; the first true branch executes. | None |
| And | Logic | Executes multiple branches in parallel (executes in order top to bottom). Use when activities should happen at the same time. | None |
| Server script | Script | Executes a server-side script. Requires at least one user role. | Success, Error |
| Close workspace tab | Navigation | Closes the current Workspace tab. Can optionally prompt the user before closing. | None |
| Navigate to record | Navigation | Navigates the user to a specific record page. | None |
| Navigate to route | Navigation | Navigates the user to a custom (non-record) route. | None |
| Navigate to URL | Navigation | Navigates the user to a URL, optionally in a new browser tab. | None |
| Alert | Modal | Displays a modal that notifies users without requiring further input. | Modal closed |
| Confirm | Modal | Displays a modal prompting the user to confirm or cancel an action. | Modal closed, Primary button clicked, Secondary button clicked |
| Confirm and destroy | Modal | Displays a modal for irreversible actions (such as deletion), with directive language and warnings. | Modal closed, Primary button clicked, Secondary button clicked |
| User input | Modal | Displays a modal with fields for the user to complete. Fields can be added manually or sourced from a table. | Modal closed, Primary button clicked, Secondary button clicked |
| Create modal | Modal | Opens UI Builder component building to create a custom modal. | Modal closed; additional events can be defined by the custom component |
| Form | Modeless dialog | Displays a form inside a modeless dialog, allowing users to multi-task within their current context. | Modeless dialog closed, Primary button clicked, Secondary button clicked |
|
Create modeless dialog |
Opens UI Builder component building to create a custom modeless dialog. | Modeless dialog closed; additional events can be defined by the custom component |
Form interaction type only
The following steps are only available when the UI interaction type is set to Form. Form interactions require a form controller on the page and provide access to form-specific data and actions.
Field actions modify individual fields on the form. They do not produce success or error events; the step connects directly to the next step or end.
| Step | Description | Events |
|---|---|---|
| Add field message | Adds a message below a specified field. | None |
| Clear field message(s) | Clears messages from a specified field. | None |
| Clear field messages by type | Clears all field messages of a given type. For example, all info messages. | None |
| Clear field value | Clears the value of a specified field. | None |
| Set field invalid | Sets a field to valid or invalid. | None |
| Set field label | Updates the label of a specified field. | None |
| Set field placeholder value | Sets the placeholder value of a specified field. | None |
| Set field read-only | Sets a specified field to read-only. | None |
| Set field required | Sets a field as required or optional. | None |
| Set field value | Sets the value of a field. Can trigger or bypass dirty state. | None |
| Set field visibility | Shows or hides a specified field. | None |
Form actions operate on the form as a whole and include capabilities such as saving the form, validating the form, or displaying alerts.
| Step | Description | Events |
|---|---|---|
| Add form alert | Displays an alert at the top of the form component. | None |
| Clear all form alerts | Removes all alert notifications from the form. | None |
| Clear form alerts by type | Removes form alert notifications of a specified type. | None |
| Execute client script | Runs a client script on the form. | Success, Error |
| Execute UI action | Executes a UI action, client and server side, that has been enabled for Configurable Workspace. | Success, Error |
| Refresh form | Refreshes the form component. | Success |
| Save | Saves the form. | Success |
| Show/hide annotations | Shows or hides annotations on the form. | None |
| Submit form using UI action | Submits the form using a specified UI action. | Success, Error |
| Validate | Validates the form. | Success, Error |
List interaction type only
The following steps are only available when the UI interaction type is set to List. List interactions require a list controller on the page and provide access to list-specific data and actions.
| Step | Description | Events |
|---|---|---|
| Execute client script | Runs a client script on the list. | Success, Error |
| Group by column | Groups the list by a specified column. | None |
| Refresh list | Refreshes the list component. | Success |
| Set query | Updates the encoded query of the list. | None |
| Sort | Sorts the list by a specified column, ascending or descending. | None |