Skip to content
Home » Workflow Variables

Workflow Variables

Workflow Variables

Workflow Variables are used like common variables are used in any programming language. Their functionality is to be assigned to a particular field of an object.

A fixed/static value can be assigned or a dynamic value can be lifted from another (source) field and assigned to a target field.

Workflow Variables are used like common variables are used in any programming language. Their functionality is to be assigned to a particular field of an object.

Workflow Variables are used like common variables are used in any programming language. Their functionality is to be assigned to a particular field of an object.

Workflow Variables are used like common variables are used in any programming language. Their functionality is to be assigned to a particular field of an object.

Add Assignment-type node

The lifecycle of workflow variables has four stages.

Workflow Variables lifecycle
  1. Variable is created
  2. Variable is defined
  3. Variable is assigned to relevant properties (in the Workflow)
  4. The values of the variable are assigned to relevant properties whenever the event triggers the workflow (e.g. a new record is created)

Our Use Case

Lets assume that we are a cargo delivery service and are in the process of adding delivery vans to our fleet.

The following two characteristics are common that we are going to utilize for the Workflow Variables:

  1. The delivery Vans are all 1-Ton capacity
  2. All of the vans are to be located at Dartmouth
Our Usecase

So the Capacity property can be set to 1 and the Location field can be set to Dartmouth using the variables. After the variables are configured, each time a vehicle is created (added to the fleet), its capacity and location properties would be automatically set to the relevant values.

Creating the Variables

The creation of a variable is the first step of using these variables, later in the Workflow.

To create the variables:

Click the Workflow Variables button on the Workflow screen.

Click the Workflow Variables button

The Create Workflow Variables window appears.

Variables window
  1. Variable Name: Users can give any suitable name to the variable
  2. Data Type:Currently three types of variables are supported: Text, Number, and Boolean
  3. Delete variable:Used to delete the relevant variable
  4. Add variable:Used to add a new variable row that can be used to define a new variable

Users can define (and use) single or multiple variables in a workflow.

Add desired variables and then click the close button.

Click the close button

The variables are created.

Defining the Variables

Once the variables are created we can assign values to them. This is used by a node of Assignment type. The process is as follows:

Add a node to the Workflow and select it’s type as Assignment.

Add Assignment-type node

You may want to rename the node if desired.

Select the Object. Most of the time it would be only 1 in the list that could be chosen.

Select the desired Variable.

Select the desired variable

The values assigned to a variable could be static or custom.

For Static values:

If a static value is to be added then directly enter it in the textbox.

Enter value

For Custom values:

If a value is to be copied from another property then click on the ellipsis button.

Click on the Ellipsis button

And then select Custom option from the dropdown.

Select Custom

Finally select the desired property (whose value would be copied).

select the desired property

Repeat the process with all the created variables and close the node details section.

Close the section

This completes the third part of the variables lifecycle.

Assigning variable values to relevant properties (in the workflow)

Create a node with type Update Record.

Create node with type Update Record

Select the relevant object.

Select relevant object

Select the desired field of the object. This field would receive its value from the Workflow Variable.

Select desired field

Select the Variable checkbox. This tells the Workflow how the selected property of the object would get it’s value.

Select Variable checkbox

Now select the relevant Workflow Variable from the list.

Select the relevant Workflow Variable

We have applied a Workflow Variable to one of the object’s properties.

Click the + Property link.

Click the + Property link

Repeat the process mentioned above to link all the desired properties with the relevant Workflow Variables. Once done, close the node details section.

Close the section

You may want to rename the workflow by clicking on the edit icon at the top.

Click the Edit icon

Enter a suitable name and press Enter ↵.

Give suitable title

Click the Save button.

Click Save button

Close the Workflow window.

The Workflow is created for the variables to take action every time a vehicle is created.

Workflow created with variables

Now we have set the stage for Workflow Builder automation. The next phase is carried out by Codeless ONE.

Assigning variable values to actual records

Using any of the Codeless ONE views, add a new Vehicle and leave the Capacity and Location properties blank.

2 fields left blank for the variables to fill

You can see that the properties left blank have been automatically filled. This is done using the Workflow Variables that we devised in the above sections.

Variables automatically filled the blank properties