Skip to content

FindPosition

Returns list of available positions by name. Empty positions (no active employee exist) are not returned by this function. Id property of these positions correspond to the Id column on OrganizationUnitPosition table.

1
$Membership.FindPosition(position: string, organizationUnit: string, direction: ( `"Up"` | `"Down"` | `"None"` )):Array<Identity>

Parameters

string position
    Position to find.

string organizationUnit
    Specifies the search direction. Optional but can be set to one of following values.

( "Up" | "Down" | "None" ) direction
    Specifies the search direction. Optional. If not specified, Up is used.

Remarks

Empty positions with no employee are not returned by this function even position is defined.
If organization unit provided, position only searches with specified unit scope. Direction parameter specifies the scope of search.
Organization unit parameter can be specified as Id (guid value) of unit to search or path of organization (e.g. 'MyDepartment/MyChildUnit')

Find "Accounting Specialist" on current organization.

1
var positions = $Membership.FindPosition('Accounting Specialist');

Find "Accounting Specialist" on "General Management" department.

1
var positions = $Membership.FindPosition('Accounting Specialist', 'General Management');

Find "Accounting Specialist" on "General Management/Accounting" department.

1
var positions = $Membership.FindPosition('Accounting Specialist', 'General Management/Accounting');

Find "Accounting Specialist" on "General Management/Accounting" department by using department Id.

1
2
var organizationUnit = $Membership.FindIdentity('General Management/Accounting', 'OrganizationUnit');
var positions = $Membership.FindPosition('Accounting Specialist', organizationUnit);

See Also