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

SQL code to select approvers from a specific role

Does anyone have the exact SQL code to make an approval step for people in a specific role. I want to do one approval procedure with multiple queries to pick up approvers. One of the queries should be members of a specific role. The role is in the AERole table.
Similar to the procedure "OR - Members of a certain role" but i need the code for a specific role to add multiple queries in one procedure.

Parents
  • Hi QOS,

    In it's simplest form the query would look like this:

    select p.uid_person as UID_Person, Null as UID_PWORulerOrigin
    from person p
    join personinorg pio on pio.uid_person = p.UID_Person
    and pio.UID_Org = (select UID_Org From Org where Ident_Org='<Your role Ident_Org')

    But this takes no account of the 'state' of the approver identity etc. (And this is only for a Business Role - not an Application Role.)

    HTH, Barry.
Reply
  • Hi QOS,

    In it's simplest form the query would look like this:

    select p.uid_person as UID_Person, Null as UID_PWORulerOrigin
    from person p
    join personinorg pio on pio.uid_person = p.UID_Person
    and pio.UID_Org = (select UID_Org From Org where Ident_Org='<Your role Ident_Org')

    But this takes no account of the 'state' of the approver identity etc. (And this is only for a Business Role - not an Application Role.)

    HTH, Barry.
Children
No Data