3 ways to add data to a Repeating Group
Get started with our 3 ways to add data to a repeating group Bubble tutorial. We demonstrate how to make sure that your repeating group is populated with data when the page loads, how to change this data with a workflow and how to update the repeating group list using a conditional statement and custom state.
Unlock the power of repeating groups: Learn 3 game-changing methods to populate your Bubble repeating groups with dynamic data!
Master Bubble workflows: Discover how to use workflows to update repeating group content on-the-fly and create powerful filtering options.
Take your Bubble app to the next level: Learn to leverage custom states and conditional statements for flexible data display in repeating groups.
Three Ways to Add Data to Repeating Groups in Bubble
Here's three ways to add data to your repeating groups in Bubble and if you find this video useful we'd really appreciate a like and subscribe. You can also find many more Bubble tutorial videos exclusive to our members at PlanetNoCode.com.
Method 1: Direct Data Source
Way number one is probably the most straightforward. On your repeating group, select the type of content you want to display and then get your data through one of two ways: either do a search for (in this case I'm doing a search for contacts) or refer to a list field in your database. This is going to pull in all of the contacts from my contact data type and display it on the repeating group, and you can see it's doing so there.
Method 2: Using Workflows
Route number two is that you can use a workflow. This is particularly useful if you need to update the content in the repeating group. For example, the data source methods can be useful for what you want to display initially when the page loads, but what if I want to update it? Let's change this to update data and add in a workflow. I'm just going to delete these; these are from a different demo about pagination on tables, so go check that video if it's already live.
Let's put data in through a workflow. We can use element actions and we can say display list. I've only got one place on the page I can display a list, and that's my repeating group. As long as my data source results in contacts, I can override it. For example, if I say do a search for contact, I could use this as some sort of filter. I could say where first name is Jessica and go back into my workflow. I could say where first name equals Jessica.
So that's only going to return contacts where the first name is equal to Jessica. If I refresh the page, my default loads in all of my contacts, and then if I say update data, I'm only going to get Jessica back.
Method 3: Using Conditional Statements
Route 3 is that you can use conditional statements. On my repeating group, I can use this button here to set a custom state. I'm going to create a custom state on my page here. Custom state is a way of temporarily storing data; it isn't saved to your database and it's lost when the page refreshes.
I could just say filter and then I can say if that's a yes or a no, by default to no. But if I click this button, I can set state my page that filter to yes. Then in the condition, I can say when the filter (remember this is my page; I've called it my page repeating group just to be a little bit confusing) is yes, I can change my data source.
This time I could say do a search for contact. Let's try to find something else relevant. Let's say where contacts first name contains "hey". I'm not quite sure what that's going to do, let's have a look. My full list loads in and then set custom state, and yeah, I just get the words that contain "hey".
Conclusion
So there you go, that's three different ways that you can add data to a repeating group, allowing you to be really quite flexible with how you're developing your MVP with Bubble.
Can't find what you're looking for?
Search our 300+ Bubble tutorial videos. Start learning no code today!
3 ways we support solopreneurs
Our team is here to help, with a combined 30+ years working for internet startips.
Learn Bubble
Explore our library of 300+ Bubble and no code tutorial videos. Watched by over 800k no coders on YouTube.
Bubble Coaching
Troubleshoot your Bubble app and build new no code features with our in house Bubble expert.
Mastery
Ready to take your SaaS idea to the next level? Join our exclusive Mastery program for personalised content & mentoring.