Skip to content

FindManager

Returns manager position of specified identity if found.

1
$Membership.FindManager(identity: ( string | Identity ), position: ( string | Identity )):Array<Identity>

Parameters

( string | Identity ) identity
    Identity to find manager of

( string | Identity ) position
    Current position of identity. Optional.

Remarks

When input identity is a user;
Calculates the manager position of specified user.
If manager position is empty, tries the scan organization hierarchy upper level, until to a position found, otherwise null.
When input identity is a organization unit
Calculates the common manager of existing positions in specified organization unit.
If multiple manager found, throws error.
If no position exist, returns null.

Find a manager by form data

1
$Membership.FindManager( $Xml.Evaluate('PersonnelInformation/Owner') );

Find a manager by form data with position identifier

1
$Membership.FindManager( $Xml.Evaluate('PersonnelInformation/Owner'), $Xml.Evaluate('PersonnelInformation/Position') );

Find the manager of who has processed the current work item

1
$Membership.FindManager( $WorkItem.CompletedBy );

Find the manager of a organization unit

1
$Membership.FindManager( $Xml.Evaluate('Department') );

See Also