# Filter a collection with Buttons

**URL:** <https://community.glideapps.com/t/filter-a-collection-with-buttons/74437>\
**Category:** Ask for Help\
**Created:** [June 28, 2024, 8:00am UTC](https://community.glideapps.com/t/filter-a-collection-with-buttons/74437 "2024-06-28T08:00:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AxelG](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@AxelG](https://community.glideapps.com/u/AxelG)\
**Post date:** [June 28, 2024, 8:00am UTC](https://community.glideapps.com/t/filter-a-collection-with-buttons/74437/1 "2024-06-28T08:00:02Z")

</div>

On my App, I have a page showing a collection with a list of all items.

What I would like is to have 3 buttons on top which will FILTER my collection based on which button you press.

So it is showing all by default. Pressing button 1 will filter out only items that are in category 1. Pressing button 2 … Etc

I tried it with a button block on top… But I don’ tseem to get the settings right.  
I tried with an action, when adding this action to the block, then the block disapears?  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/4/4/4479d8dd3da460bf8a4085461fcaf783a25c093a.png)

All options are welcome.

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [June 28, 2024, 11:37pm UTC](https://community.glideapps.com/t/filter-a-collection-with-buttons/74437/2 "2024-06-28T23:37:21Z")

</div>

There are 3 paths for you to go with, I believe:

- Add a user-specific column, and have your buttons write to that column. Filter the collection by the user-specific value.

- Still add a user-specific column, but have a single choice component that has 3 options, and filter the collection using the user-specific value.

- Use the built-in filter, which I think you probably don’t want since you went the button way.

---

<div class="post-metadata">

**Author:** ![AxelG](https://avatars.discourse-cdn.com/v4/letter/a/d2c977/32.png) [@AxelG](https://community.glideapps.com/u/AxelG)\
**Post date:** [July 1, 2024, 9:09am UTC](https://community.glideapps.com/t/filter-a-collection-with-buttons/74437/3 "2024-07-01T09:09:29Z")

</div>

> [@ThinhDinh](#):
>
> 3 paths for you to go with, I believe:
> 
> - Add a user-specific column, and have your buttons write to that column. Filter the collection by the user-specific value.

Thanks dor your answer. But it’s more like a selector. like show all GREEN / RED / BLUE items. Would the above then be the best option ?

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [July 1, 2024, 2:06pm UTC](https://community.glideapps.com/t/filter-a-collection-with-buttons/74437/4 "2024-07-01T14:06:30Z")

</div>

What do you mean by selector? You can select with a choice component, and that’s possibly the easiest way to go to not handle too many components on the front-end for chosen option’s visibility.
