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"":

 $parent->creator->cmw.account.manager

Expression for calculating the 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).
We used the formula to pull up the manager of the user specified in the ""creator"" field which is a system field but the same approach can be applied to any other ""User""-type field. To get more information on how to configure a subtask initiated by a workflow read this article.
Attachments
There are no attachments for this article.
Feedback
Security Code
Related Articles
About the Users Database
Viewed 206 times since Wed, Dec 5, 2018

How to Create a Document
Viewed 110 times since Wed, Dec 5, 2018

Vаlidation Rules
Viewed 237 times since Thu, Apr 9, 2020

Creating Steps
Viewed 98 times since Wed, Dec 5, 2018

Comindware Tracker in Cloud database size calculation
Viewed 185 times since Wed, Dec 5, 2018

Sales FAQ
Viewed 292 times since Wed, Dec 5, 2018

Retrieving a Lost Password at Comindware Website
Viewed 176 times since Wed, Dec 5, 2018

History Events Chart
Viewed 178 times since Wed, Dec 5, 2018

Configuring Mozilla Firefox
Viewed 101 times since Wed, Dec 5, 2018

Organizing Lists And Dashboards Into Favorites
Viewed 98 times since Thu, Apr 9, 2020