# Hide expired rows

**URL:** <https://community.hubspot.com/t/hide-expired-rows/110799>\
**Category:** CMS Development\
**Created:** [July 7, 2024, 8:01pm UTC](https://community.hubspot.com/t/hide-expired-rows/110799 "2024-07-07T20:01:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DPueppke](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@DPueppke](https://community.hubspot.com/u/DPueppke)\
**Post date:** [July 7, 2024, 8:01pm UTC](https://community.hubspot.com/t/hide-expired-rows/110799/1 "2024-07-07T20:01:46Z")

</div>

I’m sure this is basic but I can’t figure it out.

I need to hide any rows in this db that are past the expired date in a column named **expiration\_date**.

Thanks!

\<!-- variable contains all unfiltered table data --\>  
{% set data = hubdb\_table\_rows(6825372, ‘&published=true’) %}

\<!-- Loop through each row --\>  
{% for row in data %}

\<!-- carrier --\>  
{# Loop through each carrier in our Foreign ID column #}  
{% for carriers in row.filter\_a %}  
\<span class=“aep-carrier”\>{{ carriers.name }}\</span\>  
{% endfor %}  
\<!-- resource title --\>  
\<span class=“aep-title”\>{{row.name}}:\</span\>  
\<!-- description with url --\>  
\<span class=“aep-description”\>  
{% if row.page\_url %}  
\<a href=“{{ row.page\_url }}” target=“\_blank”\>{{row.description}}\</a\>  
{% endif %}  
\</span\>

\<!-- description with download link --\>  
\<span class=“aep-description”\>  
{% if row.link %}  
\<a class=“aep-description” href=“{{ row.link }}” target=“\_blank”\>Download\</a\>  
{% endif %}  
\</span\>  
\<hr\>  
{% endfor %}

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [July 7, 2024, 9:43pm UTC](https://community.hubspot.com/t/hide-expired-rows/110799/2 "2024-07-07T21:43:39Z")

</div>

@DPueppke - I’d suggest one approach to this is filtering the table rows when you retrieve them using something like:

{% set table = hubdb\_table\_rows(module.hubdbtable, queryparam) %}

where (for instance with a timestamp value in the expiration column):

{% set queryparam = 'expiration\_date\_\_gte=0s%}

The explanation of these query strings, including the ‘0s’ shorthand for current time is at: [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/cms/hubdb#filter-returned-rows)

You can also add a sort order etc. into this query.

I hope this is helpful

Steve
