Call Multi Select Items from HubDb

Hi
I am trying to call Hubspot database items into a custom module using a HubDb row field. I can call text and images that are stored in the database but not multi select items.
The field looks like this:

Titles can be called using:

{{ item.resource.columns.name }}

Description is:

{{ item.resource.columns.description }}

Image can be called using:

{{ item.resource.columns.image.url}}

If I use the following code it pulls back a lot of info around the multiselect rather than just the actual items.

{{ item.resource.columns.type }}

Screenshot 2024-11-26 181000.png

Here is the database column for reference:

Thank you in advance for any assistance.

Hi @Woodsy :waving_hand: Thanks for your question. I’d like to ask some of our community champions if they have any HubDB wisdom they can share with us — hey @GiantFocal @Anton @jeremymandle, do you have any suggestions for @Woodsy?

Thank you very much for taking a look! — Jaycee

Hi @Woodsy,

Multi-select field return arrays; you can use a

for loop

to display the values.

You can replace your {{ item.resource.columns.type }} with the following:

{% for type in item.resource.columns.type %}
{{ type.name }}
{% endfor %}

Thank you Ernesto @GiantFocal, that worked perfectly.

Hi @GiantFocal if there is more than 1 item in the multi select how would I adapt this code to show the first item in the multi select only? Thanks