# Filter by button

**URL:** <https://forum.wixstudio.com/t/filter-by-button/28063>\
**Category:** Ask the community\
**Tags:** code, question\
**Created:** [July 16, 2020, 5:26pm UTC](https://forum.wixstudio.com/t/filter-by-button/28063 "2020-07-16T17:26:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jennifervisbecq](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/jennifervisbecq/32/12089_2.png) [@jennifervisbecq](https://forum.wixstudio.com/u/jennifervisbecq)\
**Post date:** [July 16, 2020, 5:26pm UTC](https://forum.wixstudio.com/t/filter-by-button/28063/1 "2020-07-16T17:26:46Z")

</div>

Hi, I think my issue is very easy for all of you. I am a beginner on wix.

I have a page with repetition connected to a database named Elements.  
In Elements database, I have a column named Public. In this one you can find 3 differents types of public (Young, Very young, Adults)  
I would like to filter the repetition bloc with buttons. Button Young, Button Very Youg, Button Adults

I don’t know how I could do it. Could someone help me please?

Thank you very much  
Best Regards  
Jennifer

---

<div class="post-metadata">

**Author:** ![CODE-NINJA](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/code-ninja/32/110588_2.png) [@CODE-NINJA](https://forum.wixstudio.com/u/CODE-NINJA)\
**Post date:** [July 16, 2020, 6:09pm UTC](https://forum.wixstudio.com/t/filter-by-button/28063/2 "2020-07-16T18:09:26Z")

</div>

Hello Jennifer,

in this little example, you can see how to do this with some code and a DropDown-Menu.  
I think it is a better option, then using 3-buttons instead.

[https://russian-dima.wixsite.com/meinewebsite/blank-3](https://russian-dima.wixsite.com/meinewebsite/blank-3)

Just take a look and do the same like in this example.

---

<div class="post-metadata">

**Author:** ![thrishtilabs](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/thrishtilabs/32/950_2.png) [@thrishtilabs](https://forum.wixstudio.com/u/thrishtilabs)\
**Post date:** [July 16, 2020, 6:15pm UTC](https://forum.wixstudio.com/t/filter-by-button/28063/3 "2020-07-16T18:15:12Z")

</div>

Hi Jennifer,

Happy to have you here. Have a look at this link.

> **[wix-data - Velo API Reference - Wix.com](https://www.wix.com/velo/reference/wix-data)**
>
> The wix-data module contains functionality for working with data in collections.

This link explains how to use a filter. So when you press a button you need to apply the filter for that specific button to the dataset.

Try it out and let us know how it went… If you are unable to make it work, post what you tried and I will help you.

Regards  
Nithin

---

<div class="post-metadata">

**Author:** ![jennifervisbecq](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/jennifervisbecq/32/12089_2.png) [@jennifervisbecq](https://forum.wixstudio.com/u/jennifervisbecq)\
**Post date:** [July 20, 2020, 1:16pm UTC](https://forum.wixstudio.com/t/filter-by-button/28063/4 "2020-07-20T13:16:16Z")

</div>

Hi, Thank you a lot for helping me.

I show you what I tried in the joined file. Don’t know what is wrong but it doesn’t work at all.

Thank you so much  
Best Regards  
Jennifer

 ![](https://us1.discourse-cdn.com/wix/original/3X/1/f/1fe44e9b3c66d05c23fb9cfd331b548d04e8edcc.jpeg)

---

<div class="post-metadata">

**Author:** ![stylefromthesticks](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/stylefromthesticks/32/101096_2.png) [@stylefromthesticks](https://forum.wixstudio.com/u/stylefromthesticks)\
**Post date:** [December 4, 2024, 5:18pm UTC](https://forum.wixstudio.com/t/filter-by-button/28063/5 "2024-12-04T17:18:33Z")

</div>

I am having trouble with the coding on a client’s site. They want a button to filter a database by a specific category. Can anyone help me with this?
