Help Creating Dynamic Hierarchy


I’m trying to build a page that has a hierarchy of elements to display family relationships, similar to a family tree. Obviously I need it to be infinitely expandable (to add as many kids, grandkids, etc.) and also collapsible (in the case of no kids, grandkids, etc.)

My initial thought was repeating groups. And that got me as far as displaying kids under parents. But how would I then place a repeating group under the kids for grandkids?

See the image below for the structure I’m trying to achieve. Thanks!

Hi there, @seth.griffin… any chance you know and are working with @ryparken on this project? If not, it is one heck of a coincidence that they posted something earlier in the day yesterday that literally has the exact same layout you have described.

The reason I bring it up is that if these are, indeed, different projects, maybe ryparken already has the repeating group thing figured out and can shed some light on it for you. Anyway, just a thought.


Ha, no connection, just one of those weird coincidences. Your answer to his thread was quite helpful though!

A weird coincidence, indeed. I’m happy to hear my answer was helpful… hopefully ryparken can help you out with the repeating group stuff… best of luck!

Hey @seth.griffin and @ryparken,

Put together a quick demo for y’all that may help. I deal with this everyday in the 2 enterprise apps I have built on Bubble.

Bubble shines in this area of relational data :slight_smile:

Here’s the app:

And here’s the editor: (I think anyone can view it?)

@ryparken More specifically to your forum post, you have to delete from the bottom up. In my example, when you delete a parent, I first delete the great grandchildren (if they exist), then move to the grandchildren (if they exist), then to the children (if they exist), and finally the parent.

If it is created right from the start, it should be as smooth as that.

Note that the performance is still pretty good - And from a relational standpoint, it’s fantastic.

I hope this helps y’all - Took me a while to get to this point.


You don’t want to be creating a Bubble table at each level if this is the case.

So instead relate the table to a list of itself. Hopefully this is still working !

Hi there. First of all, thanks for replying. I’ve studied you example, and what I can see is that you just manually iterate two levels down. This is what I was doing, but I don’t think it’s efficient. I was looking of Bubble has a way to automatically look “down the stream”…

1 Like

Yea - I think @NigelG may have that solution above :slight_smile:

What I find interesting is yesterday, I noticed when I deleted an entry manually in my database that was related to a parent entry in another Data Type, Bubble automatically deleted the reference in the parent entry. If only it did that automatic reference deleting in the 1 “delete” workflow…

This topic was automatically closed after 70 days. New replies are no longer allowed.