Create a variable

You can create user-defined variables from the Action configuration window when you are configuring a workflow action or from the toolbar of the designer page.

Create a variable during action configuration

  1. In the Action configuration window, click in a field that accepts variables.
  2. Do one of the following depending on the method available;
    • On the drop-down list that appears, Click Create New Variable.
    • On the Insert Reference pane that appears, expand the Workflow Variables section and click Create New Variable.
  3. Do the following in the Workflow Variables pane to create the variable:
    1. For Name, type the variable name you want to use.
    2. Select a Type.
    • If you want to display the variable on the start form, select the Show on start form check box.
    1. Click Create.

Create a variable from the designer toolbar

  1. On the toolbar of the Designer page, click Variables. The Variables dialog box appears.
  2. Click New and fill in the following:
    1. For Name, type the variable name you want to use.
    2. For Type, select a variable type corresponding to the type of data you want to store.
    1. Click Save.

For more information, see User-defined variable types and Initiation options.

Edit an existing workflow variable

If you want, you can edit the name and Initiation setting of an existing workflow variable.

  1. On the designer toolbar, click Variables. The Variables dialog box appears.
  2. Click the workflow variable you want to change and edit the name and initiation settings as needed.

    Note: Variable type cannot be changed.

  3. Click Save to apply the changes. variable type cannot be changed.

Delete an existing workflow variable

If you want, you can delete an existing workflow variable.

  1. On the designer toolbar, click Variables. The Variables dialog box appears.
  2. On the row of the variable you want to delete, click and confirm the deletion.
  3. Click Save to apply the changes.

Configure a workflow variable as a start variable

You can configure variables to collect data when a workflow is manually started. These variables will be shown on a start form used to initiate the workflow and allows users to specify a value for the workflow variable before the workflow starts, basically passing values into the workflow before it starts.

Variables displayed on a start form are also known as the "start data" of the workflow and represent data that must be collected when the workflow is started.

Note:  If the workflow starts automatically, then default values are used for start data.

To learn how to manually start a workflow, see Start a workflow manually.

Configure a variable to show on a workflow start form:

  1. Open the required workflow. The workflow designer opens.

  2. On the toolbar, click Variables. The Variables window opens.
  3. To edit an existing variable, click the required variable. The row becomes editable.

    or

  4. To create a variable, click New on the Variables window toolbar, enter a Name, and select the Type for the variable.

  5. Select the Initiation check box for the required variable.
  1. Click Save to commit changes.

Workflow reference

A reference is used to construct content containing information specific to the list or library item and to the current instance of the workflow. You can insert a reference to configuration fields of actions in a workflow. References can be inserted only to configuration fields that accept references.

Do one of the following to add a reference to a workflow action:

  • Click on the field that accept references and from the Insert Reference pane that appears on the right, double-click on a reference to select.
  • For example, to insert the login name of the initiator (the person who initiated the workflow), in the Insert Reference pane, expand the section Workflow Context and then double-click the reference Initiator login name.

  • If the field is a drop-down list, select the lookup type and then, in the associated field, enter or select the reference.

  • For example, to insert the current site URL, select Workflow Context and then select Current site URL.

  • Click the lookup symbol to the right of the field and select the lookup type and then enter or select the reference. Displays a drop-down list. For more information, see Lookup.