Contact Us 1-800-596-4880

Set Variable

The Set Variable action step assigns a new value to a variable. You can either enter the new value directly or use an existing variable of the same type, e.g. the input variable of another action step. The variables must be of the same type in order to populate one variable with the content of another variable, e.g. you can only populate a variable of type:Text with another variable of type:Text In order to ensure that the types are the same, this action step has to be configured in several stages (see step-by-step instructions for the wizard below). Validation of variable types is performed when the action step is launched.

Variables from the BasePath cannot be modified using the Set Variable action step. Attempting to do so will generate an error message.

Changes to a variable are logged in the Workflow Run Results. The logs record both the old and new values of the variables. Variable values that are longer than 16 characters are shown in truncated form.

Properties

Common

  • New value Enter the new value for the variable to be modified. This field is only displayed when the new value is being entered manually. If the new value is based on another variable, the field is not displayed.

Other properties that are the same in all action steps are described in section 2.2. For reasons of clarity they are not shown here.

Wizard

  • Variable The field displays the variable that will be overwritten with Value as well as the variable’s type. If "No Variable is mapped…" is displayed, this means that no variable has been set using the Mappings Editor (in this case, proceed as described in the step-by-step instructions below).

  • New value Enter the new value for the variable to be modified. You can also insert variables from the workflow.

Variables from the BasePath cannot be modified using the Set Variable action step. Attempting to do so will generate an error message.

Step-By-Step – Configure Set Variable as Follows

  1. Drag the Set Variable action step to the desired position in the workflow.

  2. Open the Set Variable wizard.

  3. Enter a new value for the variable to be changed in the Value field. You can also insert variables from the Workflow. To do so, click the pin button and select one of the available variables.

  4. Click on the pin in the Set Variable action step in the Workflow.

  5. In the "Edit Variable Mappings for …" dialog, select the variable that you wish to modify from the "Variable" drop-down menu. The drop-down menu will only show variables that are of the same type.
    Use the "New value" drop-down menu to set the new variable to the value of another variable. This menu also only displays variables that are of the same type. To use the value specified in the wizard, leave the <None> option in the drop-down menu.
    Confirm your selection with OK.

  6. The pin for the Set Variable action step will now be shown in red.

  7. As an extra check, open the Set Variable wizard. The "Variable" field should now show the variable to be changed, followed by its type in brackets.