# Trying to evaluate if one list is contained in another

**URL:** <https://forum.bubble.io/t/trying-to-evaluate-if-one-list-is-contained-in-another/90283>\
**Category:** Need help\
**Created:** [May 7, 2020, 12:46am UTC](https://forum.bubble.io/t/trying-to-evaluate-if-one-list-is-contained-in-another/90283 "2020-05-07T00:46:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![manwithaplan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@manwithaplan](https://forum.bubble.io/u/manwithaplan)\
**Post date:** [May 7, 2020, 12:46am UTC](https://forum.bubble.io/t/trying-to-evaluate-if-one-list-is-contained-in-another/90283/1 "2020-05-07T00:46:54Z")

</div>

I’ve got an Option Set called “sustainable attributes”, then I’ve got a data type called “Products” and it has a field for “sustainable attributes” and it’s a list.  
 ![Screen Shot 2020-05-06 at 8.40.01 PM](https://us1.discourse-cdn.com/bubble/original/3X/5/0/505e09258732f4ac489fd33e2d498ecc8482243e.png)

Then I’ve got a custom state that is a list of selected sustainable attributes:  
 ![Screen Shot 2020-05-06 at 8.40.43 PM](https://us1.discourse-cdn.com/bubble/original/3X/c/b/cb01716ebef29129af759269eacef625c79fe665.png)

I’m trying to Do A Search For… Products where the “sustainable attributes” of the product are in the “Selected Sustainable Attributes”, but I’m getting errors. As far as I can tell, I am comparing two lists, so I should be ok, but obviously it’s not working!  
 ![Screen Shot 2020-05-06 at 8.43.10 PM](https://us1.discourse-cdn.com/bubble/original/3X/a/a/aa00790f863321de850eb1c05f46c4da63914374.png) ![Screen Shot 2020-05-06 at 8.44.52 PM](https://us1.discourse-cdn.com/bubble/original/3X/5/8/58bb91237081949cd441b2d800856b7189c78b1d.png)

Any documentation on seeing if one list is contained in another? Can I use the Option Set for this?

---

<div class="post-metadata">

**Author:** ![NigelG](https://avatars.discourse-cdn.com/v4/letter/n/ea5d25/32.png) [@NigelG](https://forum.bubble.io/u/NigelG)\
**Post date:** [May 7, 2020, 6:50am UTC](https://forum.bubble.io/t/trying-to-evaluate-if-one-list-is-contained-in-another/90283/2 "2020-05-07T06:50:55Z")

</div>

Try and advanced filter … “Contains List”…

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

Bear in mind it is direction sensitive, so A may contain B but B may not contain A.

---

<div class="post-metadata">

**Author:** ![manwithaplan](https://avatars.discourse-cdn.com/v4/letter/m/f1d935/32.png) [@manwithaplan](https://forum.bubble.io/u/manwithaplan)\
**Post date:** [May 7, 2020, 11:50pm UTC](https://forum.bubble.io/t/trying-to-evaluate-if-one-list-is-contained-in-another/90283/3 "2020-05-07T23:50:58Z")

</div>

It took me a few minutes to _find_ Advanced Filter, but it’s what I was looking for. I knew it must be somewhere!

–\> After doing the regular search, you add the :filter to the “Do a search” part.

---

<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:** [July 16, 2020, 12:46am UTC](https://forum.bubble.io/t/trying-to-evaluate-if-one-list-is-contained-in-another/90283/4 "2020-07-16T00:46:58Z")

</div>

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