I’ve got a page setup with nested repeating groups, with the parent being the category, and the nested repeating group being the items. However, the category list is long, and right now the parent repeating group shows all of the categories. How do I set up the repeating group to only show categories that have items?
The way I would do it is to have a ‘yes/no’ ‘items’ variable in categories. When an item gets added, change the category’s variable to ‘yes’ (can also include a “when it’s ‘no’” condition). Then filter the repeating group for categories with a ‘yes’ value. Or use a counter variable then filter categories with items greater than zero.
Try to avoid searches within searches as it will quickly slow down your app. Duplicate data or use a trick like above if you have to in order to load the results from one search only.
This would not work as these are part of a hierarchy under a Projects thing.
If I added a yes/no for each category, it would be the same for every project.
A solution that I just though of would be to create a new field for list of things under projects and add the categories used for that project there when I create an item.
Hey @blake1 Can you share a link to your app or screenshots of the data structure/repeating group setup?
Nice. All the more important to avoid nested searches. They’re tempting to implement because they’re so easy to do, but have a severe impact on performance that will get worse as the database grows. This would apply to any platform, not just bubble.
I think bubble should have a warning mechanism when users add searches within repeating groups. This is especially important for users who have no programming background, which is bubble’s target market.