Hierarchies

Find out the hierarchy path of a field. Hierarchy Start Position identifies the record, and Parent Field identifies its parent. You can even include the field itself within the hierarchy path.

Required Editions

View supported editions.

A hierarchy node writes each record's parent chain into a text field. The Hierarchy Field alias is the name of the text field. Hierarchy Start Position identifies the record, and Parent Field identifies its parent. The Hierarchy path lists Hierarchy Start Position values from the record up through each parent. With Include hierarchy start position field selected, each path starts with the record's own Hierarchy Start Position value.

The result of a hierarchy node includes all the fields from the source node and the text field containing the hierarchy path. Use the hierarchy path that’s stored in this field to transform data in subsequent nodes.

Hierarchy node with Source Node set to User, Hierarchy Start Position set to Id, Parent Field set to ManagerId, Include hierarchy start position field selected, and Hierarchy Field set to UserHierarchyPath.

Employee Manager Chain
Employee Manager Chain

This example finds each employee's manager chain from the User source node. Hierarchy Start Position is Id which is the employee's own identifier, Parent Field is ManagerId that stores the Id of the employee's manager, Include hierarchy start position field is selected, and the Hierarchy Field alias is UserHierarchyPath, which is the text field that stores the hierarchy path.

Roberto Alvarez's Id is 1. His ManagerId is 3, which is Lance Park's Id. Lance's ManagerId is 4, Erin Donaghue's Id. Erin's ManagerId is 5, Ada Balewa's Id. Ada has no manager. Because Include hierarchy start position field is selected, Roberto's UserHierarchyPath starts with his own Id: 1 / 3 / 4 / 5.

Employee Name Id (Hierarchy Start Position) Manager Name ManagerId (Parent Field) UserHierarchyPath
Roberto Alvarez 1 Lance Park 3 1 / 3 / 4 / 5
Gabriela Livingston 2 Erin Donaghue 4 2 / 4 / 5
Lance Park 3 Erin Donaghue 4 3 / 4 / 5
Erin Donaghue 4 Ada Balewa 5 4 / 5
Ada Balewa 5 - - 5

Gabriela Livingston's path is 2 / 4 / 5. Her ManagerId is 4, Erin Donaghue, and Erin's manager is Ada Balewa. Lance Park's path is 3 / 4 / 5. Erin Donaghue's path is 4 / 5. Ada Balewa's path is 5, her own Id, because she has no manager.

To total a value up the same parent chain, use hierarchical aggregation.