Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
like
Id -- Name -- Father ID
100 A --
101 B 100
102 C 100
103 D 102
104 E 102
if I will select E I want a list of all fathers.
like
A
C
E
is it possible?
Regards
JH
Hi,
maybe one solution might be:
tabNodes:
Hierarchy (Id,ParentID,Name,'ParentName',Name,'Path',,'Depth')
LOAD * INLINE [
Id, Name, ParentID
100, A, --
101, B, 100
102, C, 100
103, D, 102
104, E, 102
];
tabAncestors:
HierarchyBelongsTo (Id,ParentID,Name,'AncestorID','AncestorName','DepthDiff ')
LOAD Id, Name, ParentID Resident tabNodes;
DROP Field Name From tabAncestors;
hope this helps
regards
Marco
Hi,
maybe one solution might be:
tabNodes:
Hierarchy (Id,ParentID,Name,'ParentName',Name,'Path',,'Depth')
LOAD * INLINE [
Id, Name, ParentID
100, A, --
101, B, 100
102, C, 100
103, D, 102
104, E, 102
];
tabAncestors:
HierarchyBelongsTo (Id,ParentID,Name,'AncestorID','AncestorName','DepthDiff ')
LOAD Id, Name, ParentID Resident tabNodes;
DROP Field Name From tabAncestors;
hope this helps
regards
Marco
Try using generic key
Thank you very Much, looks good let me try.
my table has list of 1000's I would be picking different values. let me see if it solves the purpose.
but very helpful thank you very much
One more Question is there a way that I can just add field Path in my table to keep it simple?