# HubDB Selection Field

**URL:** <https://community.hubspot.com/t/hubdb-selection-field/35226>\
**Category:** CMS Development\
**Tags:** design-manager, hubdb\
**Created:** [April 9, 2021, 11:16am UTC](https://community.hubspot.com/t/hubdb-selection-field/35226 "2021-04-09T11:16:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![LucBenayoun](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lucbenayoun/32/27465_2.png) [@LucBenayoun](https://community.hubspot.com/u/LucBenayoun)\
**Post date:** [April 9, 2021, 12:02pm UTC](https://community.hubspot.com/t/hubdb-selection-field/35226/2 "2021-04-09T12:02:56Z")

</div>

Hey!

From what I understand, you currently set a “Format” field which is a dropdown select. From this field, you want to retrieve what is the data selected from this field and show an icon if this is the case right?

Well, follow this kind of logic and it should work 🙂

```lia-code-sample
{% set table = hubdb_table_rows(module.hubdbtable_field) %}
{% for row in table %}
{% if row.format.name|lower == "download" %}
// If format = download
{% else %}
// If format != download
{% endif %}
// Other code
{% endfor %}

```

Example with some HTML:

```lia-code-sample
{% set table = hubdb_table_rows(module.hubdbtable_field) %}
<div class='container'>
 <div class='row-fluid'>
 <h1>HubDB Example</h1>
 </div>
</div>
<div class='container'>
 <div class='row-fluid'>
 {% for row in table %}
 <div class='span4 columns'>
 <div class='category'>
 {% if row.format.name|lower == "download" %}<i class='download'>Icon</i>{% else %}{{ row.format.name }}{% endif %}
 </div>
 <h2>{{ row.name }}</h2>
 </div>
 {% endfor %}
 </div>
</div>

```

Cheers 🙂

---

_[View the full topic](https://community.hubspot.com/t/hubdb-selection-field/35226)._
