Use variables in your workflow
In the Action configuration panel, you can insert a variable into a field that accepts variables. Each field that accepts variables accommodates one or more methods for inserting variables. Not all methods are available for all fields. Some fields allow you to type ahead and select from a filtered list of existing variables while others require selection from a drop-down list or from the Insert variables dialog box.
You can also resolve, remove, replace, view, edit, and delete variables in the Variables panel or from the configuration panel of an action.
Jump to:
Insert a variable using a filtered list
- In a field that accepts variables, type [[.
-
If you know the name of the variable you're looking for, continue typing to filter the list of displayed variables. Alternatively, scroll the list to find the variable you want to insert.
-
Click the variable you want to use.
A list of variables that can be inserted into the field is displayed.
Note: To type two opening square bracket characters instead of displaying existing variables from a filtered list, press Esc. The variables list opens.
Select a variable from a drop-down list
Some fields provide a drop-down list of all the existing variables that can be inserted into that field. Open the drop-down and select the variable you want to insert.
Tip: If you want to create and insert a new variable, select Add a variable from the drop-down list.
Select or create a variable in the Insert variables panel
Some fields that accept variables have + displayed on the top right of the field. This means you can use the Insert variables panel.
- Hover over the field until +Insert is displayed.
-
Click + Insert or click Add variable from the drop-down list.
The Insert variables panel is displayed.
- Click the tab of the variable type you want to use.
For example:- To see workflow variables you have created, click the Workflow tab.
- To see start event variables, click the Start event tab.
- Click the variable you want to use.
- Click Insert.
You can also create a new variable. See Create a variable from the toolbar.
Resolve deleted form control variables
Form field variables that are created for Start event forms are available as start event variables in the workflow. If a form variable is used in a workflow action and the form control is deleted subsequently, a warning message is displayed in the action configuration panel. You can resolve it by replacing the variable or deleting the variable.
-
On the Workflow designer toolbar, click Variables to open the Variables panel.
-
Go to Start event > Form variables.
The variables that need to be resolved will be greyed out and displays a warning icon next to it.
-
Hover over the form variable that has to be resolved.
The Resolve button is displayed.
-
Click Resolve.
-
To resolve:
-
If you want to replace the variable with an alternative variable: Open the Replace all tab, select the variable you want to replace it with and click Replace. This replaces all instances of the form variable in the workflow with the selected variable.
-
If you want to delete the variable from the workflow action configuration: Open the Remove all tab click Remove. This removes all instances of the form control from the workflow. Removing an object also removes its nested variables in the actions using it.
-
Remove all variables from actions using it
If a variable or object is no longer needed or it is invalid, you can remove it from all actions using it. This cannot be undone. You can remove active and deleted variables. Removing an object also removes its nested variables in the input of actions using it; the output field of actions using the object is not impacted.
-
On the Workflow designer toolbar, click Variables to open the Variables panel or click +Insert from the configuration panel of an action.
-
Next to the variable or object you want to remove from all actions, click and select Replace/Remove.
-
Click Remove all.
If you are removing all objects, its nested variables are displayed.
-
Click Remove.
All variables or objects are removed from actions using it. This cannot be undone.
Replace all variables in actions using it
You can replace all instances of a variable or object in all actions using it with a different variable or object of the same data type. You can replace active and deleted variables. This cannot be undone. Replacing an object also replaces its nested variables.
Replacing all variables in actions using it is helpful when a variable or object or has been superseded by another variable or object in workflow actions or an invalid variable is being used in actions.
-
On the Workflow designer toolbar, click Variables to open the Variables panel or click +Insert from the configuration panel of an action.
-
Next to the variable you want to replace in all actions, click and select Replace/Remove.
-
Click Replace all.
Variables and objects with the same data type as the one that you are replacing are displayed. If you are replacing an object, only objects that have the same nested variables as the one you are replacing are displayed.
-
Select a variable or object to use as a replacement.
-
Click Replace.
All instances of the variable or object are replaced in the actions using it. This cannot be undone.
View variable usage
You can view the number of workflow actions in which a variable is used and the exact actions where it is used. Click on an action to go to the location of that action in the Workflow designer. The action configuration panel will open and you can view and edit the action, as necessary. This makes it easy to edit a variable in a specific action without having to remove or replace the variable in all actions using it.
-
On the Workflow designer toolbar, click Variables to open the Variables panel or click +Insert from the configuration panel of an action.
-
Next to the variable for which you want to view usage, click and select Usage.
Actions in which the variable is used are displayed.
-
(Optional) Click an action to open it on the Designer canvas in the Workflow designer.
Edit variable
You can view the details of a variable, such as name, default value, type, and the number of workflow actions in which it is used. You can also edit the name and default value of the variable.
-
On the Workflow designer toolbar, click Variables to open the Variables panel or click +Insert from the configuration panel of an action.
-
Next to the variable that you want to view and edit, click and select Details.
-
Click Edit.
-
Edit the Name and Default value of the variable, as necessary. To edit the Default value, click and select a new value.
-
Click Save.
Delete variable
You can only delete a variable if it is not being used in any actions. You can manually remove or replace a variable in actions using it so that you can then delete it (see View variable usage to help you find a variable in actions and delete it). If you want to remove a variable from all actions using it, see Remove all variables from actions using it. If you want to replace a variable in all actions using it, see Replace all variables in actions using it.
-
On the Workflow designer toolbar, click Variables to open the Variables panel or click +Insert from the configuration panel of an action.
-
Next to the variable that you want to delete, click and select Details.
-
Click Edit.
- Click the delete icon.
Reuse connector object variables
You can reuse object variables within actions of the same connector that have the same structure, making it easier to manage complex data.
-
Object variables can be reused in other actions only if the object parameters are the same. For example, if the object has two parameters, Name and ID, then the object variable schema of the other connector action you want to use it in has to have the same parameters.
-
Values are overwritten at each reuse execution. For example, if the first run sets Name to TestA and ID to 1, the next run will change it to Name = TestB and ID = 1. By the end of the workflow, you'll end up with TestB and 1.
-
When you copy and paste an action that has an object variable in the output, it creates a duplicate of the output variable with a different name. For example, if the copied action's output is "Object 1," the first paste will change it to "Object1 1" by adding 1 to the name. If you paste it again, it will become "Object1 2". If you want the pasted action to reuse the original variable, you can select the original variable in the output field.