Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.

Assign a Declarative Action in Agent Workspace

Log in to subscribe to topics and get notified when content changes.

Assign a Declarative Action in Agent Workspace

Associate a defined Declarative Action to a form, list, or field in Agent Workspace to add custom functionality to your workspace.

Before you begin

Role required: admin

Procedure

  1. Navigate to Declarative Action > Action Assignment.
  2. Click New.
  3. On the form, fill in the fields.
    Table 1. Assign a Declarative Action form
    Field Description
    Action Name Unique name for your action.
    Action Label Action label that displays on the form when a user hovers over the field. For field decorators, the label serves as the tooltip. For list and form buttons, the label serves as the text for the button.
    Note: You can add syntax {{}} for an unknown value to evaluate at runtime. Example: {{count}}.
    Action Option that you can select for an available action from the action definition table.
    Action Model Action model to designate where your action appears.
    • Field: The action appears as a decorator next to a field.
    • Form: Where on a form (contextual sidebar, related item) that the action renders.
    • List: The action only appears in the header of a the list.
    • Related List: The action only appears in the header of the list.
    Model Fields required Fields that are required to display.
    Description Summary of the action assignment.
    Tooltip Text that displays when a user hovers over the field name. If a user leaves this blank, the Action Label text appears.
    Note: You can add syntax {{}} for an unknown value to evaluate at runtime. Example: {{count}}.
    Form position For the form action model, select either Contextual Side Bar or Related List.
    Table Table that you can select with the form action model.
    View UI view that you want to associate with the action assignment.
    Application Application that the action runs in.
    Workspace Workspace that the action runs in.
    Active Option that you can select. You can use this assignment if you also use Enabled.
    Note: If theActiveoption is not available, the system falls back to the parent's table declarative action, if applicable.
    Enabled Option that you can select. If you do not select the Enabled option, the assignment is not available and does not render.
    Note: Selecting the Active option does not override this setting to make the assignment available.
    Order Order that applies if multiple actions are selected per model.
    Icon Icon that is used on the field action.
  4. Depending on the action assignment, you need to fill in the fields for a related list:
    • Action Attributes
    • Server Conditions
    • Server Script
    • Client Conditions
    On the form, fill in the fields.
    Table 2. Action Assignment Related Lists form
    Related List Field Description
    Action Attributes Action Payload Payload that you define to dispatch to an internal event when an action triggers. For example: {"table":"{{table}}","row":{"sys_id":{"value":"-1"}},"parent_table":"{{parentTable}}","additional_data":{"query":"{{query}}"}}
    Server Conditions Record Conditions Condition builder that you use to add conditions that must be met before the action displays.
    Note: You can add syntax {{}} for an unknown value to evaluate at runtime. Example: {{count}}.
    Server Conditions Script Condition Script that you add conditions that must be met before the action displays.
    Server Conditions Required Roles Role and access that you assign to view the action. Roles can require:
    • Create access
    • Delete access
    • Read access
    • Write access
    Server Script Server Script Script to execute when an action triggers. The server script uses the same environment and variables as a UI action server script.
    Client Conditions Client Conditions on Fields Field or fields to add conditions.
Feedback