# Help with do a search for:filtering many to many using a custom state list based on an option set list

**URL:** <https://forum.bubble.io/t/help-with-do-a-search-for-filtering-many-to-many-using-a-custom-state-list-based-on-an-option-set-list/142544>\
**Category:** Need help\
**Created:** [March 22, 2021, 9:50pm UTC](https://forum.bubble.io/t/help-with-do-a-search-for-filtering-many-to-many-using-a-custom-state-list-based-on-an-option-set-list/142544 "2021-03-22T21:50:34Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![boston85719](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/boston85719/32/77286_2.png) [@boston85719](https://forum.bubble.io/u/boston85719)\
**Post date:** [March 23, 2021, 6:06am UTC](https://forum.bubble.io/t/help-with-do-a-search-for-filtering-many-to-many-using-a-custom-state-list-based-on-an-option-set-list/142544/6 "2021-03-23T06:06:32Z")

</div>

I’ve never used the intersect method and not sure if it would return different results than the method I use.

I also don’t use custom states in most cases and opt to use URL parameters, so that the user can navigate using browser navigation and not lose their search…this also allows them to save the URL to the DB as a single text field if they want to save a search.

> [@How to set Parameter as a List](http://forum.bubble.io/t/how-to-set-parameter-as-a-list/107486/23):
>
> Update to this Tip If you are using an approach to displaying your results that incorporates a reusable element, you would not be able to use this method…and in fact this method may be able to be adjusted using the following approach and avoids the multiple custom states for ‘is in’ vs ‘is not in’ You can do this without using any custom states Essentially the extract with regex pattern takes the parameter and turns it into a text list so that the cont…

Here are some screen shots from an application I use during a lesson on Data Modeling in Bootcamps I run.

![Screen Shot 2021-03-23 at 12.59.04 PM](https://us1.discourse-cdn.com/bubble/original/3X/9/6/9670e74c598a9f3a6e222389580ca056fa35b13f.png)

 ![Screen Shot 2021-03-23 at 12.58.45 PM](https://us1.discourse-cdn.com/bubble/original/3X/c/9/c9ae5c5efc6410d226fff6890772c1807fba77cb.png)

Notice in the Restaurant Data type some fields are lists of options while others like Brooklyn Neighborhood is a single option.

Then on the element holding the search results this is the setup for the search using the filters

 ![Screen Shot 2021-03-23 at 12.55.08 PM](https://us1.discourse-cdn.com/bubble/original/3X/8/7/87a0f4a92f4076985ae7e36a85bfed258a302ef1.png) ![Screen Shot 2021-03-23 at 12.55.17 PM](https://us1.discourse-cdn.com/bubble/original/3X/f/4/f4effd940ab53df6a7c381cf98be219f3b6fdcbb.png)

And here is an example of a search result using only two filters for cuisine type

 ![Screen Shot 2021-03-23 at 1.03.45 PM](https://us1.discourse-cdn.com/bubble/original/3X/e/0/e0edc3b0c3c36d883d75a813bcd3911de042cc04.png)

In that screen shot only 2 restaurants search both American and Seafood, although there is a 3rd restaurant that serves American, however, it doesn’t serve Seafood so it is omitted from the results.

I believe this may be the difference between using intersect with VS the method I employ, however, I am not familiar with the intersect method and how it returns results.

And a final screen shot below of using three filters on cuisine type

 ![Screen Shot 2021-03-23 at 1.05.57 PM](https://us1.discourse-cdn.com/bubble/original/3X/d/7/d78a4f0e32c34ce306d4387b377884510ce9ddfb.png)

---

_[View the full topic](https://forum.bubble.io/t/help-with-do-a-search-for-filtering-many-to-many-using-a-custom-state-list-based-on-an-option-set-list/142544)._
