# Filtering a HubDB based on a modules input

**URL:** <https://community.hubspot.com/t/filtering-a-hubdb-based-on-a-modules-input/28271>\
**Category:** CMS Development\
**Tags:** hubdb\
**Created:** [November 20, 2020, 11:00am UTC](https://community.hubspot.com/t/filtering-a-hubdb-based-on-a-modules-input/28271 "2020-11-20T11:00:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [November 20, 2020, 11:00am UTC](https://community.hubspot.com/t/filtering-a-hubdb-based-on-a-modules-input/28271/1 "2020-11-20T11:00:24Z")

</div>

Hi,

I have a HubDB set up, which has a multi-select colum.

I want my module to filter our specific rows in the HubDB based on what I entire into a text field on the page.

Using a text field, what I want to happen is that on the page this module gets added too, The code I have returns blank. I don’t know how to compare the item.name to the module.category value.

```lia-code-sample
{% set category = hubdb_table_rows(module.faq_table, '&orderBy=order') %}
 {% for row in category %}

			{% for item in row.category_select %}		
			{% if item.name == modul.category %}
 <div class="shadow">
 <div class="acc-btn" data="img{{loop.index}}">
 <h3 {% if loop.index == 1 %} class="selected" {% endif %}><span>{{ row.title }}</span>
 <img class="plus" src="https://cdn2.hubspot.net/hubfs/4351639/2019/assets-may-2019/plus-bold.svg" alt="plus symbol">
 <img class="minus" src="https://cdn2.hubspot.net/hubfs/4351639/2019/assets-may-2019/minus-bold.svg" alt="minus symbol">
 </h3>
 </div>
 <div class="acc-content {% if loop.index == 1 %} open {% endif %}">
 <div class="acc-content-inner">
 {{ row.content }}
 </div>
 </div>
 </div>

	{% endif %}
	{% endfor %}
 {% endfor %}

```

---

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [November 20, 2020, 11:02am UTC](https://community.hubspot.com/t/filtering-a-hubdb-based-on-a-modules-input/28271/2 "2020-11-20T11:02:04Z")

</div>

Ignore me. Friday mornings. I realised that I mispelt module. That fixed the problem

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [November 20, 2020, 5:08pm UTC](https://community.hubspot.com/t/filtering-a-hubdb-based-on-a-modules-input/28271/3 "2020-11-20T17:08:19Z")

</div>

@pm8rsh88 ,

we will let it slide this one time.

But we are watching you 👁‍:left\_speech\_bubble:
