Query employee manager chain for director title

  • 1 August 2016
  • 2 replies
  • 11 views

Badge +3

I am hoping to find an automated way to determine from a form using a workflow who is the director the individual reports.

The idea is to copy the director on the manager approval since the approval goes to the subsidiary President in the next approval. For my requirements the director needs to be notified during the direct manager approval once submitted.

Their are a couple of caveats that I am not sure how to handle.
How to identify the directors level? The title form Active Directory shows either Director, Department i.e. "Director, Tax" or "Sr. Director, Sales" or "Dir, Supply Chain"

How do I loop or recurse the lookup for manager title does not equal director? For example Loop if current VarDirector.Title != '*Dir*'


2 replies

Badge +3

Hi Richard,

You would need to use the Query User Profile in a loop.  basically you would need to do the following:

1) Create a variable for My Manager, Manager, Account Name and a variable for Job Title

2) Do a lookup on the Manager of the current user and add that to My Manager variable

3) Start your loop

4) Do a lookup using the Query user profile action

     a) My Manager as the account Name

     b) Return the Manager as the variable My Manager, The Job title as Job title and the Account Name as Manager

5) Use a regular expression to check the Job title or containing Dir

If it does stop the loop if not run through the loop again, which would not pass the your managers manager as My Manager and get their manager, account and Job title - onwards and upwards.

I hope that helps - otherwise give me a shout and I can throw an example together.

Craig

Badge +3

Hi Craig,

Thanks for the help! I went ahead was able to reproduce a working flow that resolves the Director and/or VP for the chain of an employee. Also, I included the ability to determine if the current user was a Director or VP as well.

Thanks,

Richard

Reply