I have a two repeating groups, one that shows active groceries and one that shows completed groceries. When you click an item in the active groceries, it adds that item to the completed groceries. I want to know how I can count duplicates in each repeating group. For example:
I have have 4 chips, I don’t want it to show as:
lays
lays
lays
lays
instead I want it to show only one item and have a count that says 4.
I want to remind you that my Repeating groups display data from a List. So for example the items being displayed are gotten from the data type ShopInfos which contains information about the product.
to stop the duplicates appearing in the list you just add the filter “unique elements” and next to that text in the same cell have something like “this groups list, filtered for this cells item:count”
Better is to use ‘group by’, so that you can get unique items as well as count in one shot.
And all server action, no client side, so it would be fast too.
Btw, hope you are able to get the list in lays,lays,lays kind of format. Most people struggle there as Bubble doesn’t allow addition of duplicate items to the list.
Thank you for your reply! I’ll have a look at it soon and you are right, I am indeed struggling with adding duplicates because bubble isn’t allowing it. As for the first part of your reply, could you refer to a video or show me yourself on how i can do that. I have an idea of how but just want to be sure. Later I can share some screenshots of my repeating groups and conditions so you can get a better idea.
My first response is valid only if you are able to get the duplicates in the list. There are ways to do that, but are roundabout and may not work in all scenarios.
So you may have to take a different approach e.g. creating a new data type to store items and their counts. If you take that approach, then anyway your initial question itself becomes invalid.