Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
kamalqlik
Partner - Specialist
Partner - Specialist

Hierarchy Belongs to

Hi ,

         I want an example that How Hierarchy belongs to work.

Thanks and regards

Kamal

2 Replies
hic
Former Employee
Former Employee

The HierarchyBelongsTo creates a table containing all possible ancestors to all nodes in a hierarchy table. In the attached files you have 10 nodes but tha ancestors table contains 29 records: every node has potentiall several ancestors.

Anonymous
Not applicable

Hi. If you have 2 levels, then hierarchybelongsto makes no differences at all. With 3 levels, the difference is not that relevant but there is, and that's where it starts, basically is just to have a Parent ListBox that works better.

Let say you have 5 levels.

You select a parent in level 3. Hierarchy (simple one) will associate it with just its parent in level 2, and children in level 4. That's it, 1 level up, 1 level down.

But with hierarchybelongsto It will ALSO relate it with all ascendance and descendance. So it will know that the one selected (at level 3) has a boss in level 2, and also the superior boss in level 1 (Boss of his Boss, Parent of his parent). And not only descendance (children) directly at level 4, but also has hierarchy over some grandchildren/interns in level 5.

The more levels the more useful and notorious it becomes. But then again, only when selecting on the parent field which sometimes may be necessary, some other times not.