August 16, 200619 yr Newbies Given a table with two columns, I'll call them "Current" and "Parent", which contain the names of a current node and that node's parent, is it possible to derive the full hierarchy for the current node on each record? The resulting hierarchy would appear in a third column on the table. I'll give an example with folder names (but the same logic should apply, I think, to topics/subtopics, chapters/sections, genealogical trees, org charts, etc.): GIVEN DATA (RECORD_NUM] CURRENT ; PARENT): 1] FolderA ; -nothing because it is the top-most node in the tree- 2] SubFolder1 ; FolderA 3] SubFolder2 ; SubFolder1 4] SubFolder3 ; SubFolder1 5] SubFolder4 ; SubFolder2 6] FolderB ; -nothing- 7] SubFolder5 ; FolderB 8] SubFolder6 ; FolderB 9] SubFolder7 ; SubFolder6 10] SubFolder8 ; SubFolder7 Is it possible to create a calculation/relationship that will return the following results (in the third column on the table): 1] FolderA 2] FolderA / SubFolder1 3] FolderA / SubFolder1 / SubFolder2 4] FolderA / SubFolder1 / SubFolder3 5] FolderA / SubFolder2 / SubFolder4 6] FolderB 7] FolderB / SubFolder5 8] FolderB / SubFolder6 9] FolderB / SubFolder6 / SubFolder7 10] FolderB / SubFolder6 / SubFolder7 / SubFolder8 If there isn't a calculation that can derive these relationships based on appropriate tunneling, does anyone know a looping script that could build these hierarchies? I have tried to find a related posting on this topic but my search hasn’t turned up anything. I apologize if I’ve missed this solution elsewhere. -Andrew Bradley
Create an account or sign in to comment