0 Replies Latest reply: Apr 4, 2017 8:00 AM by Vítor Castro RSS

    Hierarchy

    Vítor Castro

      Hello everyone,

       

      i am trying to develop an hierarchy of a organization structure.

       

      Untitled.png

       

      I am having a problem. I want the appearance of left board and i am obtaining the structure of the rigth board.

       

      My dataset is:

       

      NAMEPROLEREPORTINGMANAGERLEVELOFBUSINESSHEAD
      AnnDirectorCEOCompany
      JohnCEOCompany

       

      The code, i found here:

       

       

      TREE_VIEW:

      LOAD Distinct NAMEP as VALUE, NAMEP & '-NAME' as NODE_ID, ROLE & '-ROLE' as PARENT_NODE_ID, PICTUREID as Item resident Data;

      LOAD Distinct ROLE as VALUE, ROLE & '-ROLE' as NODE_ID, REPORTINGMANAGER & '-REPORTINGMANAGER' as PARENT_NODE_ID, ' ' as Item resident Data;

      LOAD Distinct REPORTINGMANAGER as VALUE, REPORTINGMANAGER & '-REPORTINGMANAGER' as NODE_ID,  LEVELOFBUSINESSHEAD & '-LEVELOFBUSINESSHEAD' as PARENT_NODE_ID, ' ' as Item resident Data;

      LOAD Distinct LEVELOFBUSINESSHEAD as VALUE,LEVELOFBUSINESSHEAD & '-LEVELOFBUSINESSHEAD' as NODE_ID,  LEVELOFBUSINESSHEAD & '-LEVELOFBUSINESSHEAD' as PARENT_NODE_ID, ' ' as Item resident Data;

       

      HIERARCHY_TABLE:

      Hierarchy(NODE_ID_H,PARENT_NODE_ID_H, ID, PARENT_NAME, NAME, Organization_Structure) load

      NODE_ID,

      NODE_ID as NODE_ID_H,

      PARENT_NODE_ID as PARENT_NODE_ID_H,

      VALUE as ID,

      VALUE as NAME

      resident TREE_VIEW;

       

       

      Can someone help me finding my mistake?

       

      Greetings