Approval procedure query for approver selection, based on members of a requested system role from IT Shop

Could you please suggest approval procedure query for approver selection, based on members of a requested system role from IT Shop

Parents
  • Hi,

    Assuming you want the approvers to be the existing members of the system role:

    select p.uid_person, null as UID_PWORulerOrigin

    from PersonWantsOrg pwo

    join ESet es on es.XObjectKey = pwo.ObjectKeyOrdered

    join PersonHasEset phe on phe.UID_ESet = es.UID_ESet and phe.XMarkedForDeletion=0 and phe.XIsInEffect=1

    join Person p on p.UID_Person = phe.UID_Person

    where pwo.UID_PersonWantsOrg=@UID_PersonWantsOrg

    Inactive person entries will be automatically filtered out by the generated code from your custom approval procedure.

    HTH, Barry.

Reply
  • Hi,

    Assuming you want the approvers to be the existing members of the system role:

    select p.uid_person, null as UID_PWORulerOrigin

    from PersonWantsOrg pwo

    join ESet es on es.XObjectKey = pwo.ObjectKeyOrdered

    join PersonHasEset phe on phe.UID_ESet = es.UID_ESet and phe.XMarkedForDeletion=0 and phe.XIsInEffect=1

    join Person p on p.UID_Person = phe.UID_Person

    where pwo.UID_PersonWantsOrg=@UID_PersonWantsOrg

    Inactive person entries will be automatically filtered out by the generated code from your custom approval procedure.

    HTH, Barry.

Children