# Repeating group filtered by multidropdown's value

**URL:** <https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123>\
**Category:** Plugins\
**Created:** [March 29, 2023, 12:12pm UTC](https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123 "2023-03-29T12:12:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mossoc99](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mossoc99](https://forum.bubble.io/u/mossoc99)\
**Post date:** [March 29, 2023, 12:12pm UTC](https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123/1 "2023-03-29T12:12:08Z")

</div>

Hello everyone, I am new to Bubble and I need your help please.

I want to filter a repeating group according to a multidropdown element.

The multidropdown allows to select options (“Exposition” in my case) configured in option sets. The multidropdown configuration seems ok, I can select the Exposition options when I am in Preview mode.  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/4/c4b1a512a6f2acfdf1bc38355357b905ffcd87b9.png)  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/c/d/cd0e3aec1b797173a1c213ac604844867e48bb4a.png)

I want the repeating group to match the Multidropdown A’s value. However I think I need to add something in the data source field after “Exposition contains Multidropdown A’s value”  
because the system does not accept it. I cannot figure out which field, function or formula I should use.

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/5/9/5962098402983b4b863be35484e46504f91ae5b2.png)

I have tried several of these functions below but I do not find a solution.  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/d/3/d36b1664de20b07eb7f9b16ea38617298cc0288e.png)

It seems to be a very basic situation. Could you please help me?

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [March 29, 2023, 12:18pm UTC](https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123/2 "2023-03-29T12:18:54Z")

</div>

Hi there, @mossoc99… you will need to use an advanced filter to do what you described. First, remove the constraint in your second screenshot. Next, add the _:filtered_ operator after `Search for Plantes` in your repeating group’s data source. Then, add a constraint to the filter, scroll to the bottom of the dropdown, and select _Advanced_. Finally, build an expression that should be something like `This Plantes Exposition contains list Multidropdown A's value.`

Also, if you have never used an advanced filter before, be aware that the filtering takes place on the client (browser) side. So, the search is going to return all of the relevant items to the client, and then the filter will be applied. Just something to keep in mind from a performance perspective.

Hope this helps.

Best…  
Mike

---

<div class="post-metadata">

**Author:** ![mossoc99](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mossoc99](https://forum.bubble.io/u/mossoc99)\
**Post date:** [March 29, 2023, 1:46pm UTC](https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123/3 "2023-03-29T13:46:40Z")

</div>

Hi @mikeloc, thank you very much for your quick answer. It is working! 🙏

This opens a new door: this expression you suggested allows to filter the repeating group with Plantes that have the exact same value than the Multidropdown A input. It is an “AND” expression:  
If Multidropdown A’s value = Option 1, Option 2  
the repeating group displays data types that contains at least Option 1 AND Option 2

My first question is: what would be the expression to allow this case below :  
If Multidropdown A’s value = Option 1, Option 2  
the repeating group displays data types that contains Option 1 OR Option 2

My second question is : how can I let the user choosing between AND or OR filter for (a) specific field(s). Ideally I would like to have something similar to the Filter functionality in Airtable :  
 ![image](https://us1.discourse-cdn.com/bubble/original/3X/6/0/606b907aa91b60fa0713d7c0f82b1eb5744307b2.png)

I think this second question is way more technical than the first one but if you have any suggestion, recommandation or ideas I should go into in depth it would be very helpful 🙂

> [@mikeloc](#):
>
> Also, if you have never used an advanced filter before, be aware that the filtering takes place on the client (browser) side. So, the search is going to return all of the relevant items to the client, and then the filter will be applied. Just something to keep in mind from a performance perspective.

Thank you for the information. Would you recommend another approach to answer the same need that is better from a performance perspective?

Best

---

<div class="post-metadata">

**Author:** ![mikeloc](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mikeloc/32/93001_2.png) [@mikeloc](https://forum.bubble.io/u/mikeloc)\
**Post date:** [March 29, 2023, 1:55pm UTC](https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123/4 "2023-03-29T13:55:35Z")

</div>

To have the repeating group display items that have any of the selected options, use this expression for the advanced filter: `This Plantes Exposition intersect with Multidropdown A's value:count > 0`

To let the user choose between AND and OR, give them a way to make that choice and set a custom state to a particular value based on the choice they make. Then, conditionally change the repeating group’s data source based on the value of the custom state.

There are entire books written on Bubble performance, so get to readin’ on that topic.

---

<div class="post-metadata">

**Author:** ![mossoc99](https://avatars.discourse-cdn.com/v4/letter/m/ed8c4c/32.png) [@mossoc99](https://forum.bubble.io/u/mossoc99)\
**Post date:** [March 30, 2023, 9:15am UTC](https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123/5 "2023-03-30T09:15:41Z")

</div>

Thank you very much for your help @mikeloc 🙏

---

<div class="post-metadata">

**Author:** ![geofmeu](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/geofmeu/32/167036_2.png) [@geofmeu](https://forum.bubble.io/u/geofmeu)\
**Post date:** [March 30, 2023, 6:57pm UTC](https://forum.bubble.io/t/repeating-group-filtered-by-multidropdowns-value/254123/6 "2023-03-30T18:57:26Z")

</div>

Wow, I can’t believe I just ran into the same problem @mossoc99 described, and we’re just the next day! Thank you so much @mikeloc for your answer, you also solved my problem! 🙏
