Set Task Assignee Depending on Parameters of the Parent Workflow Item
Setting the task assignee depending on the parent item priority
You might need to define the task assignee based on the parent item priority. Workflow items don't have a default system field for priority. Create a new field of the List of Values type intended for setting the priority of an item. For example, create the «Priority» (ID: Priority) field and drag it to the form of a workflow item. Populate the list with the following values:
Value | ID (created automatically) |
---|---|
Low | Priority.values.Low |
Medium | Priority.values.Medium |
High | Priority.values.High |
Perform the following steps to specify the assignee of a task:
1. Open a workspace, open a necessary application inside a workspace.
2. Click «Workflow Scheme» and double click a required step.
3. In the window that appears, in the «Actions» group click «Task Assignment».
4. Select the «Assign tasks and pre-populate task fields» check box and expand «Task Settings».
5. Set the following rule for assignee:
IF($parent->Priority == ID("Priority.values.Low"), ID("account.4"), IF($parent->Priority == ID("Priority.values.Medium"), ID("account.2"), ID("account.6") )) |
To check how it works, create a new workflow item and move it through workflow. On the required step the child task will be created and its assignee will be set according to the predefined rule.
Setting the task assignee depending on an item field of the User type
If you want to set a responsible person on a particular workflow step for a workflow item and want this person to be automatically specified as a task assignee on certain subsequent steps, you can use this example.
Do the following to configure the rule:
1. Open a workspace, open a necessary application inside a workspace.
2. To be able to set a responsible person for a workflow item you should create a new field of the User type in the workflow app or use the existing one. For example, the «Responsible» field (ID: Responsible).
3. Go to «Workflow Scheme». Make this field mandatory on the required step.
Type the following expression in the «Assignee» field of each task you want to be assigned to the responsible person:
$parent->Responsible |
Use the following expression for a subtask assignee:
$parent->$parent->Responsible |
To check how it works, create a new workflow item and move it through workflow. On the required step you will be prompted to select a responsible person from the list of available users.
Selected user will be automatically specified as a task or subtask assignee on the required subsequent steps.