Global Variables

Pass a Variable from Item to Tasks

At the core, catalog items are made up of variables and workflows.  These workflows consist of approvals, tasks, and other activities to help fulfill a request.

For fulfillers to be able to complete tasks efficiently, they often need insight into the initial request.  In most cases, a fulfiller can navigate from a catalog task to the parent requested item to see this information.  However, the platform can be configured to show those same variables at the task level, preventing the need for additional navigation.

Like with most things in ServiceNow, there are multiple ways to configure the platform to pass a variable between tasks.  Below we will explore two, tried and true, ways on how to accomplish this. 

From a Workflow

A workflow task activity has a slush bucket to select what variables should appear for that task.

  • Pros:
    • Granular selection of what variables are important for that specific task. 
    • A user can select different variables to show for different tasks.
  • Cons:
    • Requires a user to “checkout” a workflow and “publish” once the configuration is finalized.
    • If there are several task activities within the workflow, each individual activity will need to be reviewed and modified.

Utilizing the Global check box

At the variable level, there is a check box labeled “Global” which enables that variable to pass from the item as well as between tasks.  This checkbox is not normally configured on the variable form out of the box and may require configuration to view. 

  • Pros:
    • Simple configuration of a singular variable that works across all tasks within the item’s associate workflow.
    • The global column can be added to a list of variables for an efficient list edit functionality if multiple variables need updating.
  • Cons: 
    • Requires configuration of the OOTB variables form (recommend this is done in a default update set)
    • If the variable is used in more than one item this configuration would apply to all items the variable resides.

Check out our video series for more details on how to ensure a variable goes across both the requested item and catalog tasks.