Assigning a task to the manager of a user
Every user record within Comindware Tracker has the ""manager"" property which defines just that - the manager of the user in question. You can specify the manager manually or have this field synced with the manager property in your Active Directory. This is not just a static property though, you can pull it up and use it in your workflows and data field calculations.
Let’s imagine a ""vaсation request"" workflow during which an employee puts in a vacation request which should be approved by his/her manager before going to HR department. Obviously, you cannot ""hardcode"" the approver in your workflow and the most logical way would be to pull up the manager from the record of the user requesting the vacation. This manager would then receive a task to do the approval.
To set that up, the following expression should be used to calculate the approval subtask’s ""Assignee"":
In this expression:
- $parent - is the reference to the parent workflow task (Vacation request) this subtask will refer to.
- creator - is the id of the system field that captures the creator of the workflow task (the employee who is requesting a vacation).
- cmw.account.manager - the id of the system ""Manager"" field within the user record (the employee’s record in our case).