Set Variable Block

Variables are used to store data within a Workflow, and can be accessed within other Workflow blocks. The Set Variable block is used to change the value of a variable. This allows the value to change from the initial one.

To use the Set Variable Block, first create a new variable in the Variables panel. In that panel, specify the scope of the variable by choosing from:
  • Global Variables — When set, the new state is forwarded to all other Workstations in the project and is available for use in all Workflows.
  • Workstation Variables — When set, the new state is available for use in all Workflows on the current Workstation only.
  • Workflow Variables— When set, the new state is available for use in subsequent blocks of the current instance of this Workflow only. If the Workflow is fired again, the value will be reset to its default value.

To use the Set Variable block in a Workflow:

  1. In Project Explorer, expand Workflows. Double-click the Workflow, or right-click Background or Interactive Workflows to Add one.
  2. Drag and drop the Set Variable block into the work area from the Toolbox.
  3. In the Properties grid, select the ellipses (...) button to open the Set Variable editor, or double-click the block.
  4. Select the Function between the following options:
    Table 1.
    SetVariable( Variable(s), Value) Sets the value of one or more non-array variable.
    SetVariable( Array Variable(s), Index, Value) Sets the value of a single index across one or more array variables.
    SetVariable( Array Variable, Index(s), Value) Sets the value of multiple indices in a single array variable.
  5. Once the Function is selected, set each value by clicking its parameter and choosing the required variable or value.
  6. Click OK.
  7. Connect the Set Variable block to the previous and next blocks to be executed in the Workflow.