Recursive hierarchy in self-linked table using "child" relationship

Hello all, I’m working through the parent-child relationships of a self-linked table. I need to build a hierarchy or path which traverses a multi-level hierarchy using a “child” relationship. Some other solutions in these forums are focused on a “parent” relationship column, such as the excellent solution by @Justin_Barrett here:

https://community.airtable.com/t/parent-child-tree-hierarchy/44094

Using the above solution as an example, I would like to build the following hierarchy:

I’m open to other feedback on how construct this, even if it isn’t a scripting solution. I’ve just used the above example as a starting point.

I’m also aware of the parent vs child tradeoffs of self-linking tables. I’ve gone through multiple iterations of this project already, trying both approaches.

Thanks for the help!

Welcome to the community, @maqjara! :smiley: Thanks for the nod! I can definitely see the benefits of working the tree from the other end, and I don’t think that it would take much to modify the script that I shared in the other thread. I’m tight on time at the moment, so it might take me a few days, but I’ll see what I can do.

2 Likes

Thanks @Justin_Barrett for your contribution. Your few scripts help us a lot. You should set up ko-fi :smiley:

2 Likes

Thanks for the recommendation! I just set up an account. I won’t link it here in the thread, but you can find it in my profile.

1 Like

It took a little longer than I thought to get around to the update, but it’s done. I just added it as an option to the original script instead of making a whole new script. The link in the original thread still works, but I’ll add it here for those who might find this thread first.

2 Likes

I got parent-to-child parsing working after tackling the problem in a different way. The script at the link above has both options now.