<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Printing Multi-selector names in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/293549#M13731</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/90514"&gt;@pm8rsh88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% for item in dynamic_page_hubdb_row.location_selector %}
  {{ item.name }}
{% endfor %}&lt;/PRE&gt;
&lt;P&gt;In your case, I think you're more looking for something like this (I've also added code to make the names comma-separated):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;ul class="list-con"&amp;gt;
  &amp;lt;li class="icon1"&amp;gt;Location: {% for item in dynamic_page_hubdb_row.location_selector %}{{ item.name }}{% if not loop.last %},{% endif %} {% endfor %}&amp;lt;/li&amp;gt;
  &amp;lt;li class="icon2"&amp;gt;Employment: {{ dynamic_page_hubdb_row.employment }}&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Does that help? If I can clarify anything, let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 26 Sep 2019 22:32:13 GMT</pubDate>
    <dc:creator>lscanlan</dc:creator>
    <dc:date>2019-09-26T22:32:13Z</dc:date>
    <item>
      <title>Printing Multi-selector names</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/291680#M13627</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have set up in HubDB a column called Location Selector. All I want to do is print the values(Name) of each selection.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I try...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;ul class="list-con"&amp;gt;&lt;BR /&gt;&amp;lt;li class="icon1"&amp;gt;Location: &lt;STRONG&gt;{{ dynamic_page_hubdb_row.location_selector }}&amp;lt;/li&amp;gt;&lt;BR /&gt;&amp;lt;li class="icon2"&amp;gt;Employment: {{ dynamic_page_hubdb_row.employment }}&amp;lt;/li&amp;gt;&lt;BR /&gt;&amp;lt;/ul&amp;gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[{id=1, name='Cheadle', order=0}, {id=2, name='Manchester', order=1}]&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As per other posts, I just want to post the name. If I use&amp;nbsp;{{ dynamic_page_hubdb_row.location_selector.name }} I get nothing. It's blank.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I even tried the below, which works, but prints out the full value as shown above.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{% set table = hubdb_table_rows(&lt;EM&gt;tableID, queryparam) %}&lt;BR /&gt;{% for row in table %}&lt;BR /&gt;&amp;lt;ul class="list-con"&amp;gt;&lt;BR /&gt;&amp;lt;li class="icon1"&amp;gt;Location: {{ row["location_selector"] }}&amp;lt;/li&amp;gt;&lt;BR /&gt;&amp;lt;li class="icon2"&amp;gt;Employment: {{ dynamic_page_hubdb_row.employment }}&amp;lt;/li&amp;gt;&lt;BR /&gt;&amp;lt;/ul&amp;gt;&lt;BR /&gt;{% endfor %}&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if I use&amp;nbsp;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.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="p-right-2"&gt;Warning:15:0 Cannot resolve property 'name' in '[{id=1, name='Cheadle', order=0}, {id=2, name='Manchester', order=1}]'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;what am I missing?&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 15:02:32 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/291680#M13627</guid>
      <dc:creator>pm8rsh88</dc:creator>
      <dc:date>2019-09-17T15:02:32Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Multi-selector names</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/291688#M13629</link>
      <description>&lt;P&gt;Additional:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can get .name to work if in Hubdb table I use a select, and not a multi-select.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What the solution if I need it to be done using a multi-select&lt;/P&gt;</description>
      <pubDate>Tue, 17 Sep 2019 15:20:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/291688#M13629</guid>
      <dc:creator>pm8rsh88</dc:creator>
      <dc:date>2019-09-17T15:20:37Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Multi-selector names</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/293549#M13731</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/90514"&gt;@pm8rsh88&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% for item in dynamic_page_hubdb_row.location_selector %}
  {{ item.name }}
{% endfor %}&lt;/PRE&gt;
&lt;P&gt;In your case, I think you're more looking for something like this (I've also added code to make the names comma-separated):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&amp;lt;ul class="list-con"&amp;gt;
  &amp;lt;li class="icon1"&amp;gt;Location: {% for item in dynamic_page_hubdb_row.location_selector %}{{ item.name }}{% if not loop.last %},{% endif %} {% endfor %}&amp;lt;/li&amp;gt;
  &amp;lt;li class="icon2"&amp;gt;Employment: {{ dynamic_page_hubdb_row.employment }}&amp;lt;/li&amp;gt;
&amp;lt;/ul&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Does that help? If I can clarify anything, let me know.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Sep 2019 22:32:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/293549#M13731</guid>
      <dc:creator>lscanlan</dc:creator>
      <dc:date>2019-09-26T22:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: Printing Multi-selector names</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/293626#M13732</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I discovered&amp;nbsp;item.*** yesterday too, and I think that may solve some of my other issues too&lt;/P&gt;</description>
      <pubDate>Fri, 27 Sep 2019 10:38:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Printing-Multi-selector-names/m-p/293626#M13732</guid>
      <dc:creator>pm8rsh88</dc:creator>
      <dc:date>2019-09-27T10:38:47Z</dc:date>
    </item>
  </channel>
</rss>

