Variables in Rules
- Skip Ahead to
- What is a variable?
- Which variables can be used?
- Task variables
- People variables
- Date variables
- Custom field variables
- Examples of variables in action
- Rule actions which support variables
- Add comment action
- Set assignee action
- Create task action
- Create subtask action
- Create approval action
What is a variable?
A variable is a way to reference key task data within a rule. Variables allow you to create dynamic, flexible rules to fit your workflow.
Which variables can be used?
When rules run, you can reference variables from the following categories in your tasks: Task, People, Dates, Custom fields
People variables are further refined into Task creator, Assignee, and Rule triggerer
You can specify the exact value that the variable displays when the dynamic value is used.
For example, you may wish to refer to the name of a task in a block of text, without @mentioning it, or there may be cases where referring to the task ID number is preferable.
See all variables and the different ways you can display them below.
|Task variable||How the dynamic value is displayed|
|@mention or URL of task which triggered rule|
|Plain text name of task which triggered rule|
|Content of description field of task which triggered rule|
|ID number (e.g. 1205100117625723) of task which triggered rule|
People variables are divided into 3 subcategories:
|Task creator||Assignee||Rule triggerer||How the dynamic value is displayed|
|@mention or URL|
|Plain text name|
|ID number (e.g. 1205100117625723)|
|Date variable||How the dynamic value is displayed|
|Date and time the rule was triggered|
|Start date of task which triggered the rule|
|Due date of task which triggered the rule|
|Creation time and date of task which triggered the rule|
Custom field variables
|Custom field variable||How the dynamic value is displayed|
|Current value in the text field of the task which triggers the rule|
|Current value in the number field of the task which triggers the rule|
|Current value in the single-select field of the task which triggers the rule|
|Current value in the multi-select field of the task which triggers the rule|
|Current value in the formula field of the task which triggers the rule|
Examples of variables in action
This example shows what variables look like when building a rule.
According to the rule, when a task is moved to the Triage section, the rule is triggered and a subtask is created. The subtask contains many variables, each referring to a piece of data from the task which triggered the rule.
Building a rule with variables
Task variables can be used in task titles when the rule creates a task, subtask, or approval. In this example only the task name and task ID variables are used.
Task variables can also be used within the task description. In this example, all 4 task variables are used in the subtask’s description for illustration purposes.
Output of a rule action using variables
On the left, see the task which triggers the rule when moved into the Triage section of the project. The variables used in the rule will pull the task’s name, description, and task ID into the subtask which is created.
On the right, see the subtask created when the rule is run. The subtask contains the Task, Task name, Task description, and Task ID information which has been pulled from the task which triggered the rule.
Rule actions which support variables
See the various rule actions which support different variables.
The Add comment rule action supports all variables and their values, meaning you can reference any Task, People, Date, or Custom field variable, and choose exactly which value (Default, Name, Email, ID) you wish to display when the rule runs.
The Set assignee rule action supports all People variables, meaning you can select Task creator, Assignee, or Rule triggerer. As the action only related to changing the assignee field, the specific values of the variables ((Default, Name, Email, ID) are not relevant or supported with this action.
Create task, Create subtask, Create approval
When using the Create task, Create subtask, and Create approval actions, there are four areas within these tasks where variable can be employed; Task name, Task description, Due date field, and the Assignee field.
The Task name field supports all variables and their values The Task description supports all variables and their values The Due date field supports all Date variables The Assignee field supports all People variables