Nested Repeating Groups in Bubble: A Step-By-Step Guide
In this Bubble tutorial we demonstrate how to nest repeating groups in Bubble including how to link data between parent and children groups.
Unlock the Power of Nested Repeating Groups: Master this essential Bubble design technique in minutes!
Boost Your Bubble App's Performance: Learn how to optimize nested repeating groups and reduce workload units for lightning-fast apps.
From Contacts to Emails: Discover the secret to displaying related data efficiently in your Bubble app.
Adding Nested Repeating Groups in Bubble
Here's how to add nested repeating groups to a Bubble app. To give an example of this, I have a repeating group set up here, which is of type data type contacts. I want to list all of my data type emails that are related to this contact. Let me show you how I have it set up in the database. So I have my contacts as a field in the email, and then I have my emails here I've got listed four out.
Creating a Nested Repeating Group
So how do I show in a repeating group of contacts inside each contact a repeating group of emails? Before I launch into that, if you're learning Bubble, you found our channel, hopefully you're finding many useful videos, but we've got even more Bubble tutorial videos on our website. You can't find them on YouTube anymore. You can only find them over on our website and they're exclusive to our members at planetnocode.com.
Adding and Designing the Repeating Group
Let's add in a repeating group. So we get a repeating group and add it into the cell of my contact and it's going to be type of content email. I'm going to design it first. So we'll just have a column layout, get rid of the default for my emails. I've got a text field of subject. Just going to make this all nice and well designed and responsive as I go through. That's what I'm looking for. Right now they only take up as much space as they need, especially if I get rid of the mid height.
Setting Up the Data Source
Okay. I now need to add an appropriate data source and so I'm going to do a do a search for email and I'm linking it through the email field of type contact. So I need a way of referring to the current cell and if I go in and say contact equals, I don't have current cells contact. I've got current cells index but not current cells contact.
Understanding Element Tree and Group Structure
That's because if we look in my element tree and I think this is where people get confused. I'm using a group here to add in a background group altogether. This can also be useful if you're wanting to link the whole cell. You put everything in the cell into a group, but that means that I can't refer to the current cells contact. But the group does have the current cells contact and so in my repeating group for emails, I can say current groups contact. Let's preview that. Okay. And you can see that the email titles are coming through.
Workaround for Data Referencing
Now you may experience a situation where you struggle to find a way to link the data one up in your tree. And so sometimes I find myself just creating a group that sits as the immediate child of the highest repeating group that's there because as long as that is between this group and this group, I can refer to it in the do a search for. So that's quite a handy work around for when you can't directly refer to the current cell, you can refer to a group that is in the current cell that has got the current cells data.
Considerations for Workload Units
A couple of other things with obviously nested repeating groups is since the instruction of workload units, you'll want to be thinking about how you can limit the strain or the pressure that you put on database on Bubble server side when you do a search for. So just bear that in mind because if you have a hundred records for each contact and you display five contacts, that isn't just five records being looked up. That is five records plus five times a hundred. So you're actually looking at 105 records being recalled from the Bubble database. Obviously that's the true example, but I'm simply wanting to illustrate how it can easily multiply up if indeed you go around the route of using nested repeating groups.
Get the Complete Bundle for Just $99
Access 3 courses, 390+ tutorials, and a vibrant community to support every step of your app-building journey.
Start building with total confidence
No more delays. With 30+ hours of expert content, you’ll have the insights needed to build effectively.
Find every solution in one place
No more searching across platforms for tutorials. Our bundle has everything you need, with 390+ videos covering every feature and technique.
Dive deep into every detail
Get beyond the basics with comprehensive, in-depth courses & no code tutorials that empower you to create a feature-rich, professional app.
Save over 70%!
Valued at $80
Valued at $85
Valued at $30
Valued at $110
Valued at $45
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
Have questions?
We have answers!
Find answers to common questions about our membership plans, programs, and more.
We're here to help you launch your no code SaaS. Reach out to the team and we'll double check our vast library for useful content. We'll advise you on how we'd tackle the same problem and there's a good chance we'll record the video to help the wider community.
As a Planet No Code member, you'll receive a discount on our Bubble coaching sessions. Monthly members receive a 10% discount, while Annual members receive a 17.5% discount. To redeem your discount, simply log into your account and book a coaching session through our platform.
Our 8-week intensive mentorship program is designed to provide personalized guidance and support to help you accelerate your startup journey. You'll be matched with a startup expert who will work with you one-on-one to set goals, overcome challenges, and make rapid progress.
To apply for the Mastery Program, simply click the "Request Invitation" button on our pricing page and fill out the application form. Our team will review your application and schedule a call with you to discuss your goals and determine if the program is a good fit for your needs.
We accept all major credit cards, including Visa, Mastercard, American Express, and Discover.
While we don't offer a free trial, we do provide a 14-day money-back guarantee. If you're not completely satisfied with your membership within the first 14 days, simply contact our support team, and we'll issue a full refund.