Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
anagharao
Creator II
Creator II

Varied depth in Hierarchy

Hi All,

I am trying to display a skewed hierarchy in a list box (Treeview). However i'm encountering many blanks in the middle.

Please help.

Regards,

Anagha

4 Replies
sujeetsingh
Master III
Master III

Seems you data is not as it should be. Refer this thread.

Hierarchies and Tree-view List Boxes

marjan_it
Creator III
Creator III

I think your data is not proper for using hierarchy. for hierarchy sample you need a table with 3 column. ID, Name and ParentID.

and you can load our data like this.



hierarchyData:

load *[

ID,

Name,

ParentID];

Hierarchy(ID,

ParentID,

    Name,d,Name, hierarchyData, '-'

    )

   

LOAD

ID,

ParentID,

    Name

    Resident

    hierarchyData;

   

drop Table hierarchyData;

anagharao
Creator II
Creator II
Author

Hi,

Thank you for the reply.

I however dont have a parentID in my source. i do have the level of the leaf node in each row. Could you please help me in obtaining the parentID?

Also, I manually added the parent ID and created a heirarchy with the function you specified. It works well when i select the lowest level in the tree however it does work with the parent or ancestors.

Regards,

Anagha

anagharao
Creator II
Creator II
Author

Hi guys...

got it!!!

I was missing the hierarchybelongto() part.