# How to group data into one cell of a repeating group based on an attribute

**URL:** <https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929>\
**Category:** Database\
**Created:** [May 10, 2020, 6:49am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929 "2020-05-10T06:49:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![jakob.larsen19](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jakob.larsen19/32/50803_2.png) [@jakob.larsen19](https://forum.bubble.io/u/jakob.larsen19)\
**Post date:** [May 10, 2020, 6:49am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/1 "2020-05-10T06:49:53Z")

</div>

Hey All!

I have been struggling all day with this, any suggestions are appreciated!

Using a convenience stores inventory:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/b/1/b132c315d86b92659d2b0c8ddce51efd9cb02114.png)

I am trying to group products of the same the ‘description’ and ‘size’ into one tile of a repeating group:

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/9/6/962f2fa4cce58f376a7986114ee5d6232e7bfb98.png)

Clicking on the tile would then open a pop-up with options of ‘flavours’ available for that ‘description’ and ‘size’.

Currently I have all the inventory showing in my repeating group…how can I group/filter to only show unique combinations of description and size?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![nfish](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nfish](https://forum.bubble.io/u/nfish)\
**Post date:** [May 10, 2020, 11:30pm UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/2 "2020-05-10T23:30:32Z")

</div>

can you not filter based on the parent group of the popup?

---

<div class="post-metadata">

**Author:** ![jakob.larsen19](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jakob.larsen19/32/50803_2.png) [@jakob.larsen19](https://forum.bubble.io/u/jakob.larsen19)\
**Post date:** [May 10, 2020, 11:57pm UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/3 "2020-05-10T23:57:07Z")

</div>

Thanks for the response.

I still want items with other descriptions in that repeating group, just to have each of them only showing once. For example, if i have multiple Vitamin Water entries (one for each flavour) I want it to show up like this:

![image](https://us1.discourse-cdn.com/bubble/original/3X/d/b/dbab4390bd243055764bb24548162bd8a9d91b5a.png)

Then when I click on that tile, the pop up shows all the possible flavours that match the description (i.e. vitamin water)

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/b/cbb494f9899433f87c5cf8ae2c2b651ac8dc2dcd.png)

---

<div class="post-metadata">

**Author:** ![nfish](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nfish](https://forum.bubble.io/u/nfish)\
**Post date:** [May 11, 2020, 12:06am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/4 "2020-05-11T00:06:23Z")

</div>

OK, I think I know what you mean. Try setting the repeating group or parent group to Inventory, add, ‘do a search for _sub-category_’ with a constraint on which sub-category with each repeating group.

---

<div class="post-metadata">

**Author:** ![jakob.larsen19](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jakob.larsen19/32/50803_2.png) [@jakob.larsen19](https://forum.bubble.io/u/jakob.larsen19)\
**Post date:** [May 11, 2020, 12:11am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/5 "2020-05-11T00:11:58Z")

</div>

That was my initial thought as well, the problem is that the data set is such that each flavour has the same sub-category and description. So even if I constrain the search by sub-category I end up with 8 vitamin water tiles.

---

<div class="post-metadata">

**Author:** ![nfish](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nfish](https://forum.bubble.io/u/nfish)\
**Post date:** [May 11, 2020, 12:18am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/6 "2020-05-11T00:18:24Z")

</div>

try adding _:unique elements_ at the end of the dynamic data

---

<div class="post-metadata">

**Author:** ![jakob.larsen19](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jakob.larsen19/32/50803_2.png) [@jakob.larsen19](https://forum.bubble.io/u/jakob.larsen19)\
**Post date:** [May 11, 2020, 1:15am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/7 "2020-05-11T01:15:49Z")

</div>

I’ve tried that with no success…I thought maybe that didnt work because technically they are unique elements that happen to have the same sub-category?

---

<div class="post-metadata">

**Author:** ![nfish](https://avatars.discourse-cdn.com/v4/letter/n/f14d63/32.png) [@nfish](https://forum.bubble.io/u/nfish)\
**Post date:** [May 11, 2020, 1:41am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/8 "2020-05-11T01:41:58Z")

</div>

OK How about changing the repeating groups type of content to “text” (i.e. just type in text)

---

<div class="post-metadata">

**Author:** ![jakob.larsen19](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/jakob.larsen19/32/50803_2.png) [@jakob.larsen19](https://forum.bubble.io/u/jakob.larsen19)\
**Post date:** [May 11, 2020, 2:54am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/9 "2020-05-11T02:54:19Z")

</div>

Unfortunately that wont work either because it will also have images and numbers. Thanks for trying!

---

<div class="post-metadata">

**Author:** ![muestromi](https://avatars.discourse-cdn.com/v4/letter/m/ea5d25/32.png) [@muestromi](https://forum.bubble.io/u/muestromi)\
**Post date:** [September 11, 2020, 5:55am UTC](https://forum.bubble.io/t/how-to-group-data-into-one-cell-of-a-repeating-group-based-on-an-attribute/90929/10 "2020-09-11T05:55:13Z")

</div>

Did you solve it ?
