Skip to content

GetPath

Retrieves the organizational path of a specified organization unit.

1
$Membership.GetPath(unitId: string, separator?: string):( string | null )

Parameters

string unitId
    The unique identifier of the organization unit.

string separator optional
    The separator to use between organization unit names in the path. If not specified, the default separator "/" is used.

Returns

The organizational path of the specified unit, constructed by recursively traversing its parent units.

Remarks

unitId must be a GUID string. An invalid GUID raises a script error; an otherwise unresolved unit may produce null.

Examples

Show the department path of a unit

1
2
// 'General Management > Accounting'
var path = $Membership.GetPath($Xml.Evaluate('Department'), ' > ');