# Logic Puzzle: Unique items in repeating group

**URL:** <https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729>\
**Category:** Need help\
**Created:** [April 5, 2019, 6:25pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729 "2019-04-05T18:25:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![john.b](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@john.b](https://forum.bubble.io/u/john.b)\
**Post date:** [April 5, 2019, 6:25pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/1 "2019-04-05T18:25:34Z")

</div>

This has to be an easy one for a lot of you.

Let’s say you have the following data:

**Category** | **Name**  
Fruit Apple  
Fruit Banana  
Fruit Pear  
Car Honda  
Car Toyota  
Car Ford

(Category and Name are different fields)

You now want to make a repeating group that shows all the unique categories (in this case, “Fruit” and “Car”).

I’ve played around with “unique” in the data source window, but I only really want unique at the category level. How would I set this up?

![image](https://us1.discourse-cdn.com/bubble/original/3X/7/4/7420d12bc8a512730d416fce217f0684f0f35197.png)

---

<div class="post-metadata">

**Author:** ![mebeingken](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mebeingken/32/20139_2.png) [@mebeingken](https://forum.bubble.io/u/mebeingken)\
**Post date:** [April 5, 2019, 6:29pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/2 "2019-04-05T18:29:38Z")

</div>

Hi John,

Assuming the category field is a text field, you would want the type of content for the rg to be text.

–Ken

---

<div class="post-metadata">

**Author:** ![john.b](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@john.b](https://forum.bubble.io/u/john.b)\
**Post date:** [April 5, 2019, 6:39pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/3 "2019-04-05T18:39:06Z")

</div>

The repeating group has a mix of text (the name of the category) and images (a corresponding logo).

---

<div class="post-metadata">

**Author:** ![anon65040322](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@anon65040322](https://forum.bubble.io/u/anon65040322)\
**Post date:** [April 5, 2019, 6:43pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/4 "2019-04-05T18:43:00Z")

</div>

make categories its own type

---

<div class="post-metadata">

**Author:** ![john.b](https://avatars.discourse-cdn.com/v4/letter/j/e95f7d/32.png) [@john.b](https://forum.bubble.io/u/john.b)\
**Post date:** [April 5, 2019, 6:52pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/5 "2019-04-05T18:52:10Z")

</div>

Very possible. Was aiming to avoid this path and have just a single type that holds both the category and base item. Makes data management considerably easier . . .

I still have to believe there is a way to do this without creating two data types to hold category and base item.

---

<div class="post-metadata">

**Author:** ![anon65040322](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@anon65040322](https://forum.bubble.io/u/anon65040322)\
**Post date:** [April 5, 2019, 6:55pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/6 "2019-04-05T18:55:07Z")

</div>

yeah there is, i just cant remember & im not by computer rn to test.  
I think theres benefits from separating into types too.

---

<div class="post-metadata">

**Author:** ![mebeingken](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mebeingken/32/20139_2.png) [@mebeingken](https://forum.bubble.io/u/mebeingken)\
**Post date:** [April 5, 2019, 7:05pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/7 "2019-04-05T19:05:00Z")

</div>

Depends on what you are trying to display. You started by wanting the unique categories. A repeating group of type text, using unique elements will get you that. If you then want to display all the names for each category (like under a parent header) you can have a second repeating group with a constraint based on the category for the current cell.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [June 14, 2019, 6:25pm UTC](https://forum.bubble.io/t/logic-puzzle-unique-items-in-repeating-group/53729/8 "2019-06-14T18:25:39Z")

</div>

Closed on June 14, 2019, 6:25pm UTC

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