# Retrieve unique element in RG from multiple datas

**URL:** <https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612>\
**Category:** Need help\
**Created:** [June 14, 2021, 3:39pm UTC](https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612 "2021-06-14T15:39:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yacasu](https://avatars.discourse-cdn.com/v4/letter/y/76d3ee/32.png) [@Yacasu](https://forum.bubble.io/u/Yacasu)\
**Post date:** [June 14, 2021, 3:39pm UTC](https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612/1 "2021-06-14T15:39:21Z")

</div>

Hi,

I would like to retrieve one occurence of each datas coming from my database in a Repeating Group.

Based on this tutorial, I try to create a multi-category selection (checkboxes) : [Bubble.io Tutorial: How to Select Multiple Items From a List - YouTube](https://www.youtube.com/watch?v=yahP3RyVggY&ab_channel=CoachingNoCodeApps)

I have multiple entries that are in the same categories. So basically I have 6 categories (Fruit’s name), and each entry fall in one of them. For example, :  
Datatype : Fruit  
Field : Fruit’s name (the 6 categories)  
Field : Variety  
Field : Color  
etc.

entries :  
Apple - Gala - Green  
Apple - Golden - Yellow  
Pear - Comice - Yellow  
Apple - Braeburn - Red  
Pear - Bosc - Brown  
Peach - White Peach - Orange  
etc (like 40-50 entries)

The user has to multi-select (checkbox) between the 6 categories of Fruit’s name : Apple, Pear, Peach etc to see (like in the video) their respective information in another Repeating group.

I can’t figure out how I can set up the Repeating group so it shows only 1 time each occurence of the fruit’s name (eg : peach, apple, pear etc). So far, the RG shows all the occurences so I have (Apple / Apple / Pear / Peach / Apple / Pear / Pear etc)

Thanks a lot

---

<div class="post-metadata">

**Author:** ![faisalkarimstubapp](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@faisalkarimstubapp](https://forum.bubble.io/u/faisalkarimstubapp)\
**Post date:** [June 14, 2021, 5:14pm UTC](https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612/2 "2021-06-14T17:14:29Z")

</div>

I think here is what you can do.

You only add a Fruit to the next RG ( RG B, that display Fruit information), only when RG B’s list of Fruits’ Fruit’s name does not contains this Fruit’s name.

---

<div class="post-metadata">

**Author:** ![Yacasu](https://avatars.discourse-cdn.com/v4/letter/y/76d3ee/32.png) [@Yacasu](https://forum.bubble.io/u/Yacasu)\
**Post date:** [June 15, 2021, 7:48am UTC](https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612/3 "2021-06-15T07:48:29Z")

</div>

Thanks for your answer @faisalkarimstubapp !

This solution works for the RG B, but how about RG A ? RG A has to display only 1 occurrence of each fruit’s name that are in the database.

Or do you mean having a RG A (hidden) and RG B (visible) that displays one occurence of each fruit’s name ?

---

<div class="post-metadata">

**Author:** ![faisalkarimstubapp](https://avatars.discourse-cdn.com/v4/letter/f/43a26b/32.png) [@faisalkarimstubapp](https://forum.bubble.io/u/faisalkarimstubapp)\
**Post date:** [June 15, 2021, 11:03am UTC](https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612/4 "2021-06-15T11:03:44Z")

</div>

For RG A, you can do something like this.

In RG Data Source, Do A Search For Fruit :group by Fruit’s name

---

<div class="post-metadata">

**Author:** ![Yacasu](https://avatars.discourse-cdn.com/v4/letter/y/76d3ee/32.png) [@Yacasu](https://forum.bubble.io/u/Yacasu)\
**Post date:** [June 15, 2021, 12:02pm UTC](https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612/5 "2021-06-15T12:02:28Z")

</div>

Thanks a lot it worked !

---

<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:** [August 23, 2021, 3:39pm UTC](https://forum.bubble.io/t/retrieve-unique-element-in-rg-from-multiple-datas/155612/6 "2021-08-23T15:39:54Z")

</div>

Closed on August 23, 2021, 3:39pm UTC

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