2 Replies Latest reply: Aug 13, 2014 5:29 PM by Roberto Medellin RSS

    Hierarchy Belongs to

    Kamal Naithani

      Hi ,

               I want an example that How Hierarchy belongs to work.

       

       

       

      Thanks and regards

      Kamal

        • Re: Hierarchy Belongs to
          Henric Cronström

          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.

          • Re: Hierarchy Belongs to
            Roberto Medellin

            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.