6 Replies Latest reply: Nov 12, 2010 3:20 AM by whiteline _ RSS

    Element with multiple parents in hierarchy

      Hi,

      We have a situation where some elements have multiple parents. This come from the fact that we are simplifying a time dependant hierarchy in the source system. A company can belong to a certain group in a certain year, but than change ownership in a different year. We are using the hierarchy function. This works fine as long as the company stays in the same level. However, if the company moves level, it doesn't work.

      Let take the following script to build the hierarchy:

      ////

      Stuff1:
      LOAD * INLINE [
      Parent, Child
      ,AA
      ,BB
      AA, A
      BB, A
      BB, B
      BB, C
      A,1
      B,2
      C,3
      B,1
      B,A
      ];
      Stuff2:
      Hierarchy([Child],[Parent],[ChildName],,[ChildName],[Hierarchy],'/%/',)
      LOAD
      Child as ChildName,
      *
      RESIDENT Stuff1;
      DROP TABLE Stuff1;

      ////

      We see that the company A belongs to AA, BB and B. Which means A is twice in the level 2 and once in the level 3. Unfortunatly, the last "situation" is discarded by the hierarchy function as shown bellow:

      error loading image

      Is this a bug? Has someone found a workaround?