Creating a reusable repeating group

Hi together,

I have an application which requires me to use many RGs with different “Do a search for” as Datasource. Is there a smart way to only work on one group and let all the changes cascade to the others i.e. in a reusable element?

I would love to avoid having to edit several RGs that look visually exactly idential when I need to make changes to responesiveness etc. in the future.

I’m grateful for any hints! :slight_smile:
Best,
Philipp

Is the type of content same for all the rg?

If the type of data for all the repeating groups is the same, then yes you can. I.e., if for all of the repeating groups you are showing type User, then that’s doable. I assume this is the case since you’re saying they look visually exactly identical.

It’s not necessarily straightforward, because the data source for a RE can’t be a list, so you need some other way to get the list of items you want to display into the RE. You can do this by setting a custom state in the RE, and make it a list:

You can access this state from the page on which you’re using the RG. You’ll need to set the state from a workflow. If you don’t already have a workflow that would make sense to put it in, you can set the state on page load or when the element becomes visible (assuming you don’t need to reference the data when it’s not visible) or something like that.

You’ll have to decide if that extra setup is worth it for you. I’d say probably yes; in my experience futzing with design on multiple elements that are supposed to be identical is a pain in the ass!

Hi John, that’s a very interesting solution. I think I will use this approach for this application as it might be worth it in the long run. (and who wants to edit more than 8 RGs in case of a minor change…) Just need to check the performance when setting the content with states. Thanks! :slight_smile:

Works like a charme! This concept offers entirely new ways to work with RGs for me. Thank you John! :slight_smile:

1 Like

Glad I could help!

FYI it looks like you marked your reply as the solution; if you mark my description as the solution it would help others find it because of the way Bubble pulls up the solution reply into the original post.

Looks like I fat fingered. Marked the right solution :slight_smile:

1 Like

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