# Filter a list's data source with 'items except #'

**URL:** <https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509>\
**Category:** Idea\
**Created:** [July 12, 2017, 4:27pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509 "2017-07-12T16:27:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.bubble.io/u/matt)\
**Post date:** [July 12, 2017, 4:27pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509/1 "2017-07-12T16:27:52Z")

</div>

Currently there are list filters that include ‘item #’, ‘items until #’, ‘items from #’.

Can there be another option that is ‘items except #’?

That would be really helpful for quickly removing items from a list.

Thanks.

---

<div class="post-metadata">

**Author:** ![dan1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dan1/32/23411_2.png) [@dan1](https://forum.bubble.io/u/dan1)\
**Post date:** [July 24, 2017, 8:03pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509/2 "2017-07-24T20:03:46Z")

</div>

Have you tried using the [:filtered](https://bubble.io/reference#Data.Messages.list.filtered) function or does it have to specifically relate to a specific cell’s index?

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.bubble.io/u/matt)\
**Post date:** [July 24, 2017, 8:05pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509/3 "2017-07-24T20:05:16Z")

</div>

Here are the workflows I had to create in order to get rid of one item on the list. I even had to account for what position in the list I’m dealing with. There has to be a better way…

![](https://us1.discourse-cdn.com/bubble/original/2X/e/e6b1fc033188f59e0499c110c24ceddcc490a890.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/5/5aa4b91af1bbea0ea03c4efb59116953a4d2c64d.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/d/d7340eb987f9b8ba6f3c80c50f513216d2159478.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/5/5b78a88043a6c33f64d7aba26c8bc90b9671c25f.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/c/c838faf7b1e80e8dd41db87ded1ebaf6635e4c8e.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/e/e7974847a0c93d383fdd0479ba16bdb18e91cd3e.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/c/c5609505ea0a22b3592fe2f8b4a285de88f8e189.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/6/67c4f49684b3844118dbc35a5d5114cb6406710e.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/d/d3a0f1c8e9e48a3d7a7d2845fa94a037eafa1719.png)

![](https://us1.discourse-cdn.com/bubble/original/2X/7/74bbb61d3f8d71eafc2ac9ca9d400d1e244b1504.png)

 ![](https://us1.discourse-cdn.com/bubble/original/2X/d/dd633731d8851b0cce4cba647b3f5eed4b5c808b.png)

 ![](https://us1.discourse-cdn.com/bubble/original/2X/0/04113bb33402b237858bef4a7db3d6661abb88e6.png)

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.bubble.io/u/matt)\
**Post date:** [July 24, 2017, 8:10pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509/4 "2017-07-24T20:10:30Z")

</div>

There could be duplicate items in the list. That’s why I’m hoping to replace a list with itself except a specific item #.

---

<div class="post-metadata">

**Author:** ![dan1](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/dan1/32/23411_2.png) [@dan1](https://forum.bubble.io/u/dan1)\
**Post date:** [July 24, 2017, 8:16pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509/5 "2017-07-24T20:16:54Z")

</div>

If the major issue is duplicates, can you make use of the [:unique elements feature](https://bubble.io/reference#Data.Messages.list.unique)?

I would really recommend trying to curate the list by Do a search for [thing] for the repeating group’s data. Then using the operators of :unique, :filtered, etc as needed. That many custom states along with a find/replace is a nifty approach, but will likely cause heartburn 🙂

As well, you may run into issues whenever data is created, edited, deleted with the structure you have above.

---

<div class="post-metadata">

**Author:** ![philip](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/philip/32/17830_2.png) [@philip](https://forum.bubble.io/u/philip)\
**Post date:** [July 25, 2017, 5:07pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509/6 "2017-07-25T17:07:27Z")

</div>

> [@dan1](#):
>
> That many custom states along with a find/replace is a nifty approach, but will likely cause heartburn

Couldn’t have said it better myself. 🌶

@matt Any luck improving this process?

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.bubble.io/u/matt)\
**Post date:** [July 28, 2017, 2:07pm UTC](https://forum.bubble.io/t/filter-a-lists-data-source-with-items-except/15509/7 "2017-07-28T14:07:38Z")

</div>

I’ve found a way by using ‘:filtered’ as @dan1 mentioned. I’ve been using text lists with unique id’s, but I tried using a list of the same type I’m trying to add or remove to a group’s custom state. Because the state is now a list of same type I want to filter, I was then able to use the filter function and set the list back to itself and filtering out the current item (‘this invoice’ for example). That took care of it in one workflow.

 ![](https://us1.discourse-cdn.com/bubble/original/2X/e/e8c000647fab562619d950d0c8d7f25bb0c677f3.png)
