# Printing Multi-selector names

**URL:** <https://community.hubspot.com/t/printing-multi-selector-names/16277>\
**Category:** CMS Development\
**Created:** [September 17, 2019, 3:02pm UTC](https://community.hubspot.com/t/printing-multi-selector-names/16277 "2019-09-17T15:02:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [September 17, 2019, 3:02pm UTC](https://community.hubspot.com/t/printing-multi-selector-names/16277/1 "2019-09-17T15:02:32Z")

</div>

Hi,

I have a problem with printing from a multi-selector. I know this seems to be a common problem and I have tried multiple solutions but all produce the same result.

I have set up in HubDB a column called Location Selector. All I want to do is print the values(Name) of each selection.

When I try…

\<ul class=“list-con”\>  
\<li class=“icon1”\>Location: **{{ dynamic\_page\_hubdb\_row.location\_selector }}\</li\>  
\<li class=“icon2”\>Employment: {{ dynamic\_page\_hubdb\_row.employment }}\</li\>  
\</ul\>**

I get…

[{id=1, name=‘Cheadle’, order=0}, {id=2, name=‘Manchester’, order=1}]

As per other posts, I just want to post the name. If I use {{ dynamic\_page\_hubdb\_row.location\_selector.name }} I get nothing. It’s blank.

I even tried the below, which works, but prints out the full value as shown above.

{% set table = hubdb\_table\_rows(_tableID, queryparam) %}  
{% for row in table %}  
\<ul class=“list-con”\>  
\<li class=“icon1”\>Location: {{ row[“location\_selector”] }}\</li\>  
\<li class=“icon2”\>Employment: {{ dynamic\_page\_hubdb\_row.employment }}\</li\>  
\</ul\>  
{% endfor %}_

However, if I use row[“location\_selector”] .name I get the following warning. I don’t get how it cannot resolve a property when it clearly shows name as a property.

Warning:15:0 Cannot resolve property ‘name’ in ‘[{id=1, name=‘Cheadle’, order=0}, {id=2, name=‘Manchester’, order=1}]’

what am I missing?

---

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [September 17, 2019, 3:20pm UTC](https://community.hubspot.com/t/printing-multi-selector-names/16277/2 "2019-09-17T15:20:37Z")

</div>

Additional:

I can get .name to work if in Hubdb table I use a select, and not a multi-select.

What the solution if I need it to be done using a multi-select

---

<div class="post-metadata">

**Author:** ![lscanlan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/lscanlan/32/66262_2.png) [@lscanlan](https://community.hubspot.com/u/lscanlan)\
**Post date:** [September 26, 2019, 10:32pm UTC](https://community.hubspot.com/t/printing-multi-selector-names/16277/3 "2019-09-26T22:32:13Z")

</div>

Hi @pm8rsh88,

A multi select field is stored as a list. So just like you need to loop through the rows of a HubDB table (or at least if you’re not using a dynamic page), you’ll also need to loop through the list items of a multi select field. And each selection is a dictionary. So if you’re trying to print the names of each selection, you’d want to loop through the list and then access the name attribute within each loop. A simple version of that might look like:

```auto
{% for item in dynamic_page_hubdb_row.location_selector %}
 {{ item.name }}
{% endfor %}

```

In your case, I think you’re more looking for something like this (I’ve also added code to make the names comma-separated):

```auto
<ul class="list-con">
 <li class="icon1">Location: {% for item in dynamic_page_hubdb_row.location_selector %}{{ item.name }}{% if not loop.last %},{% endif %} {% endfor %}</li>
 <li class="icon2">Employment: {{ dynamic_page_hubdb_row.employment }}</li>
</ul>

```

Does that help? If I can clarify anything, let me know.

---

<div class="post-metadata">

**Author:** ![pm8rsh88](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pm8rsh88/32/78471_2.png) [@pm8rsh88](https://community.hubspot.com/u/pm8rsh88)\
**Post date:** [September 27, 2019, 10:38am UTC](https://community.hubspot.com/t/printing-multi-selector-names/16277/4 "2019-09-27T10:38:47Z")

</div>

Thank you!

I discovered item.\*\*\* yesterday too, and I think that may solve some of my other issues too
