Repeating group sorting!

Hello,

I got around the same question as this one:

I need to be able to sort on a specific value that can not run trough eachother.(repeating group)
What i don’t want:
product 1
product 2
product 3
product 2

But i need:
product 1
product 1
product 3
product 3
product 3
product 2
product 2
product 2

As long as they are always seperated. Its good.
This should not be so difficult i would assume but cant seem to figure it out.

Any help or pointing me in the right direction is very much appreciated.
Thanks in advance.,

Hello,

One way to achieve this result is to use two repeating groups. This can be inefficient with large datasets, but if I understand your question properly, it will provide a solution.

The first repeating group is used as the outer grouping, the inner repeating group is used to display the data. In the first repeating group, you will want to use a group by on your data source and then sort by the column you are wishing to have your list sorted by (i.e. Brand if you are trying to achieve Brand → Product). The second (inner) repeating group needs to have a constraint that restricts it to only the values that match the first repeating group. After that you can sort by Product (or any other column you choose. See below:

Screenshot 2022-05-17 at 4.00.44 PM

You can review the implementation here: Double-trouble-bubble | Bubble Editor

1 Like

Thanks a lot for you’re answer. It worked like a charm.
Took me some time but i figured it out with you’re example and explanation.
A lot of records need to be loaded but with ext. vertical scrolling it seems not to be that inefficient .

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