This site is scheduled for a small content update on Tuesday, January 22nd, between the hours of 5:00pm and 8:00pm Pacific Time (Jan 23 01:00 – Jan 23 4:00 UTC). Access to this site may be slightly delayed during that time.

Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Activity variables

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

Activity variables

Activity variables are properties specifically associated with a workflow activity.

About this task

These are the inputs that appear on the activity definition when a specific activity is dragged onto the workflow canvas. These variables are properties that define, compose or describe the workflow activity, or the work it is designed to perform.

Activity variables are declared in a related list within the Workflow Activity Definition.

To add, view, or modify a variable:

Procedure

  1. Navigate to Workflow > Activity Definitions.
  2. Select a workflow activity, such as Approval - User.
  3. In the Activity Variables section or tab, add, view, or modify the variables. Activity variables are defined using the same fields as Dictionary records.
    Note: If defining a new activity variable that is dependent on another activity variable, put the prefix "vars." before the name of the parent activity variable. For example, if the child field is dependent on a field named parent, put the value vars.parent in the Dependent field.
    To control the visibility of an activity variable on the workflow canvas after the activity has been dragged to the canvas, use a UI policy on the wf_activity table.
    To access the variables or assign values to these variables within the workflow activity, use the vars variable of the workflow activity.
     activity.vars.variable_name = new_variable_value 
Feedback