# Edit hubdb filter within the webpage editor

**URL:** <https://community.hubspot.com/t/edit-hubdb-filter-within-the-webpage-editor/16919>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [October 25, 2019, 3:09pm UTC](https://community.hubspot.com/t/edit-hubdb-filter-within-the-webpage-editor/16919 "2019-10-25T15:09:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben-duchy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben-duchy/32/84083_2.png) [@ben-duchy](https://community.hubspot.com/u/ben-duchy)\
**Post date:** [October 25, 2019, 3:09pm UTC](https://community.hubspot.com/t/edit-hubdb-filter-within-the-webpage-editor/16919/1 "2019-10-25T15:09:58Z")

</div>

Is it possible to edit an existing HubDB filter within the page editor? I want to reuse the same module over and over again on different pages, but change the filter settings based on the number of bedrooms, for example 1, 2, 3, 4, 5. See attached.

I’ve created a basic filter which displays any houses with the status column set to ‘Available’. See below:  
**{% set table = hubdb\_table\_rows(module.table\_id, “&status=Available”) %}**

It works perfectly as it’s hard coded, however how do I use the choice field so I can control it before pushing live? I’ve tried the below, but it breaks!

**{% set table = hubdb\_table\_rows(module.table\_id, “&type={{ module.bedrooms }}”) %}**

Any idea what I’m doing wrong?

 ![filter-example.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/1/014e48893793156deaeb788aed96d8350e67f0f6.jpeg)

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [December 9, 2019, 9:41am UTC](https://community.hubspot.com/t/edit-hubdb-filter-within-the-webpage-editor/16919/2 "2019-12-09T09:41:49Z")

</div>

Hey @ben-duchy

I apologize for the delay in getting back to you. I am wondering if you were able to resolve this or if you still need assistance on this matter?

Thank you

Sharon

---

<div class="post-metadata">

**Author:** ![ben-duchy](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ben-duchy/32/84083_2.png) [@ben-duchy](https://community.hubspot.com/u/ben-duchy)\
**Post date:** [December 9, 2019, 9:48am UTC](https://community.hubspot.com/t/edit-hubdb-filter-within-the-webpage-editor/16919/3 "2019-12-09T09:48:48Z")

</div>

Hi @sharonlicari ,

No worries about the delay, I figured it out using the following if statement

**{% if module.bedrooms ==‘1’%}**  
**{% set table = hubdb\_table\_rows(module.table\_id, “&status=Available&type=1”) %}**  
**{% elif module.bedrooms ==‘2’%}**  
**{% set table = hubdb\_table\_rows(module.table\_id, “&status=Available&type=2”) %}**  
**{% elif module.bedrooms ==‘3’%}**  
**{% set table = hubdb\_table\_rows(module.table\_id, “&status=Available&type=3”) %}**  
**{% elif module.bedrooms ==‘4’%}**  
**{% set table = hubdb\_table\_rows(module.table\_id, “&status=Available&type=4”) %}**  
**{% elif module.bedrooms ==‘5’%}**  
**{% set table = hubdb\_table\_rows(module.table\_id, ‘&status=Available&type=5’) %}**  
**{% endif %}**

---

<div class="post-metadata">

**Author:** ![sharonlicari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/sharonlicari/32/101479_2.png) [@sharonlicari](https://community.hubspot.com/u/sharonlicari)\
**Post date:** [December 9, 2019, 10:08am UTC](https://community.hubspot.com/t/edit-hubdb-filter-within-the-webpage-editor/16919/4 "2019-12-09T10:08:06Z")

</div>

I am glad you were able to figure it out 🙂 Thank you for sharing this!

Enjoy the rest of your week

Sharon
