Variables in Rules

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 variables

Task variableHow the dynamic value is displayed
Default@mention or URL of task which triggered rule
NamePlain text name of task which triggered rule
DescriptionContent of description field of task which triggered rule
IDID number (e.g. 1205100117625723) of task which triggered rule

People variables

People variables are divided into 3 subcategories:

Task creatorAssigneeRule triggererHow the dynamic value is displayed
DefaultDefaultDefault@mention or URL
NameNameNamePlain text name
EmailEmailEmailEmail address
IDIDIDID number (e.g. 1205100117625723)

Date variables

Date variableHow the dynamic value is displayed
Trigger timeDate and time the rule was triggered
Start dateStart date of task which triggered the rule
Due dateDue date of task which triggered the rule
Creation timeCreation time and date of task which triggered the rule

Custom field variables

Custom field variableHow the dynamic value is displayed
Text custom fieldCurrent value in the text field of the task which triggers the rule
Number custom fieldCurrent value in the number field of the task which triggers the rule
Single-select custom fieldCurrent value in the single-select field of the task which triggers the rule
Multi-select custom fieldCurrent value in the multi-select field of the task which triggers the rule
Formula custom fieldCurrent 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

screenshot_title

  1. 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.

  2. 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

screenshot_title

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.

Add comment

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.

Set assignee

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

К сожалению, этот браузер не поддерживается

Asana не работает в вашем текущем интернет-браузере. Зарегистрируйтесь из одного из этих поддерживаемых браузеров.

Выберите язык

При выборе другого языка меняется язык интерфейса и/или содержимого сайта asana.com