$Membership.FindManager

Overview

Returns manager position of specified identity if found.

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

Arguments

( 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.

Example

Find a manager by form data

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

Example

Find a manager by form data with position identifier

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

Example

Find the manager of who has processed the current work item

$Membership.FindManager( $WorkItem.CompletedBy );

Example

Find the manager of a organization unit

Copyright © 2010 - 2023 Emakin. All rights reserved.