# Can I filter dynamic page source data

**URL:** <https://community.hubspot.com/t/can-i-filter-dynamic-page-source-data/128244>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [March 19, 2025, 10:49am UTC](https://community.hubspot.com/t/can-i-filter-dynamic-page-source-data/128244 "2025-03-19T10:49:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmflan39](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wmflan39/32/45434_2.png) [@wmflan39](https://community.hubspot.com/u/wmflan39)\
**Post date:** [March 19, 2025, 10:49am UTC](https://community.hubspot.com/t/can-i-filter-dynamic-page-source-data/128244/1 "2025-03-19T10:49:28Z")

</div>

I have a HubDB ‘tasty\_fruit’ with (say) 99 rows of data. For column ‘fruit’, there are 3 types: 33 rows = apples, 33 rows = pears, 33 rows = oranges. Is there any way to filter the dynamic page source for a single value of ‘sort’, or must I create a HubDB for each type?

Many thanks for your time.

WmFlanigan

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 19, 2025, 2:09pm UTC](https://community.hubspot.com/t/can-i-filter-dynamic-page-source-data/128244/2 "2025-03-19T14:09:55Z")

</div>

Hi @wmflan39,

In order to select the dynamic page source, it has to be the entire HubDB table. However, you can apply the filter logic on the results and include/exclude rows with if/else statements, [query params](https://developers.hubspot.com/docs/guides/api/cms/hubdb#filter-returned-rows), or [HubL filters](https://developers.hubspot.com/docs/reference/cms/hubl/filters).

The most basic example to show only rows that have “apples” in the “fruit” column:

```lia-code-sample
<ul>
{% for row in hubdb_table_rows(dynamic_page_hubdb_table_id) %}
 {% if row.fruit = "apples" %}
 <li><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></li>
 {% endif %}
{% endfor %}
</ul>

```

Hope this helps!

---

<div class="post-metadata">

**Author:** ![wmflan39](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wmflan39/32/45434_2.png) [@wmflan39](https://community.hubspot.com/u/wmflan39)\
**Post date:** [March 21, 2025, 10:46am UTC](https://community.hubspot.com/t/can-i-filter-dynamic-page-source-data/128244/3 "2025-03-21T10:46:02Z")

</div>

hanks @evaldas , I think that’s just what I was loooking for. Now let’s see if I can make it work 😀

---

<div class="post-metadata">

**Author:** ![evaldas](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/evaldas/32/69160_2.png) [@evaldas](https://community.hubspot.com/u/evaldas)\
**Post date:** [March 22, 2025, 5:29pm UTC](https://community.hubspot.com/t/can-i-filter-dynamic-page-source-data/128244/4 "2025-03-22T17:29:57Z")

</div>

You got this @wmflan39 ! 🦾
