Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i am struggeling with hierarchy function in QV without getting close to my prefered result. I have two tables. One is relating names to IDs the other is relating the IDs with each other. I try to get a hierarchy level tree structure out of this.
Looking forward to some helping input on a script solution.
BR
Stefan
Can you try this below
RelTable:
Load * Inline [
ParentID, ID
2001, 3001
4001, 2001
4001, 5001
4001, 6001
5001, 3001
, 4001
];
Left Join(RelTable)
Load * Inline [
ID, Title
2001, B
3001, C
4001, A
5001, D
6001, E
];
HTable:
Hierarchy(ID, ParentID, Title, ParentTitle, Title, PathName, '\', Depth)
load * resident RelTable;
Dear Nagesh,
your example is working for the simplified data. My data are not containing statements like you introduced in your example (" , 4001"), defining what is the top level of hierarchy. Any idea how to get over that obstacle?