# HubDB column checkbox

**URL:** <https://community.hubspot.com/t/hubdb-column-checkbox/71728>\
**Category:** CMS Development\
**Created:** [December 22, 2022, 1:40pm UTC](https://community.hubspot.com/t/hubdb-column-checkbox/71728 "2022-12-22T13:40:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FilipaPF](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@FilipaPF](https://community.hubspot.com/u/FilipaPF)\
**Post date:** [December 22, 2022, 1:40pm UTC](https://community.hubspot.com/t/hubdb-column-checkbox/71728/1 "2022-12-22T13:40:35Z")

</div>

Hello!

What is the syntax to retrieve a row from the HubDB if one of the columns (checkbox) is checked?

I have a module which is only supposed to appear if that specific column is checked.

The column is “banner\_event” and I’m trying to figure out how to write it:

{% if row.banner\_event … %} ?

Thank you 🙂 !!

---

<div class="post-metadata">

**Author:** ![felixmacaspac](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/felixmacaspac/32/33923_2.png) [@felixmacaspac](https://community.hubspot.com/u/felixmacaspac)\
**Post date:** [December 22, 2022, 2:54pm UTC](https://community.hubspot.com/t/hubdb-column-checkbox/71728/2 "2022-12-22T14:54:23Z")

</div>

Hey, @FilipaPF you’re on the right track. after looping the hubdb table field you can access the column if it’s checked using the syntax you provided as an example.  
here’s a quick code snippet:

```lia-code-sample
{% set main_rows = hubdb_table_rows(module.hubdb_table) %} {# this is the hubdb table field #}

{% for row in main_rows %}
 {% if row.banner_event %}
 {# do something #}
 {% endif %}
{% endfor %}

```

.

---

<div class="post-metadata">

**Author:** ![FilipaPF](https://avatars.discourse-cdn.com/v4/letter/f/48db29/32.png) [@FilipaPF](https://community.hubspot.com/u/FilipaPF)\
**Post date:** [December 22, 2022, 3:54pm UTC](https://community.hubspot.com/t/hubdb-column-checkbox/71728/3 "2022-12-22T15:54:14Z")

</div>

Thank you @felixmacaspac ! works perfectly now|
