This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Getting a manager's manager for workflow approval

Hello,

We are still in version 6.1.3 and I am trying to find out how I can get a manager's manager for an approval.

The first step goes to the employee's manager no problem. The next step should be the manager's manager. I would think I could use the "CP - Calculated group of approvers" procedure and write the query. Is this correct?

If so, I know how to write the query to return the 2nd level manager from the Person table, but I don't know how to write the query to return the manager in the CP step.

My Person query would like something like this:

SELECT p3.UID_Person from dbo.Person p
INNER JOIN Person p2 ON p2.UID_Person= p.UID_PersonHead
INNER JOIN Person p3 ON p3.UID_Person = p2.UID_PersonHead
WHERE UID_PersonWants = '@UID_Person'

I would think i have to use the PersonWantsOrg table? I am not sure how that would look or if I need to join any other table.

Any help or input is appreciated.

Thank you!

  • If you take a look at the IT Shop Administration Guide and search for Dynamically Calculated Employee Group you will find that you need to use a statement like UID_PersonWantsOrg = '@UID_PersonWantsOrg' in your approver search query to link to the current request.

    In your case, Manger's manager of the recipient of a request that would be.

    SELECT p3.UID_Person from PersonWantsOrg pwo
    INNER JOIN Person p on pwo.UID_PersonOrdered = p.UID_Person
    INNER JOIN Person p2 ON p2.UID_Person= p.UID_PersonHead
    INNER JOIN Person p3 ON p3.UID_Person = p2.UID_PersonHead
    WHERE pwo.UID_PersonWantsOrg = '@UID_PersonWantsOrg'

  • Thank you Markus, appreciate the response. That worked like a charm