I am working on a workflow where I have to find a Manager of a manager (i.e. Employee -> Line Manager -> Manager). Another condition is to find this manager with a authorisation level. As an example, approval cannot be granted unless this manager has authorisation level of 4 (Auth Level is property in User Profile). Any ideas?
Solved! Go to Solution.
You should be able to utilise the UserProfileLookup runtime function to grab the properties of the user. You would need to pass this through from the employee then the line manager to grab their manager. Same applies for the Auth level.
One way of achieving this is by using variables.
Create 2 variables Manager1 & Manager2
Step1 (get first manager): Query user profile of the initial user and store the manager value in Manager1.
Step2 (get second manager): Query user profile of the first manager using the variable Manager1 and store value in Manager 2
Update columns wherever necessary.
You can also dig deeper by writing LDAP queries.
And isn't it possible to use only 1 variable? Its value will be rewritten every time a new approval step is requested with the name of the person whose name is in the "Manager" field in AD. This name could then be used as an assignee for the next step of approval. No?