<?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: Cannot Resolve Property 'name' in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675941#M29904</link>
    <description>&lt;P&gt;And sorry one more question... since it has multiple states, I want to add a comma between each state with display: inline so it is all on one line. Any way I can do that?&lt;/P&gt;&lt;P&gt;They're just block elements right now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-08-04 at 1.36.30 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/72185i124A2613CDE8EE4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-04 at 1.36.30 PM.png" alt="Screen Shot 2022-08-04 at 1.36.30 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Aug 2022 20:38:25 GMT</pubDate>
    <dc:creator>unicorndev</dc:creator>
    <dc:date>2022-08-04T20:38:25Z</dc:date>
    <item>
      <title>Cannot Resolve Property 'name'</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675834#M29895</link>
      <description>&lt;P&gt;Hello there! I want to be able to print out my multi select field called 'state' (it was single prior, I'll change it later lol). My code says 'Cannot Resolve Property: Name' when I try to extract the value from my HubDB.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was able to extract it successfully when I had a single select dropdown, but I need it for multi-select now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my complete code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;  &amp;lt;link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"&amp;gt;

{% set int_state_ID = 1 %}


&amp;lt;!-- set the filter --&amp;gt;
&amp;lt;div&amp;gt;
&amp;lt;form id="form_id" method="get"&amp;gt;
    &amp;lt;div&amp;gt;
        &amp;lt;h2&amp;gt;FILTER BY STATE: &amp;lt;/h2&amp;gt;
        &amp;lt;select name="state" form="form_id" onChange="this.form.submit()"&amp;gt;
            &amp;lt;option value="show-all"&amp;gt;Show All&amp;lt;/option&amp;gt;
            {% set states = hubdb_table_column(5440613, "state").options %}
            {% for choice in states %}
                {% set state_list = state_list~choice.id|list%}
                {% if choice.id == request.query_dict.state%}
                    &amp;lt;option selected="selected" value="{{ choice.id }}"&amp;gt;{{ choice.name }}&amp;lt;/option&amp;gt;
                {% else %}
                    &amp;lt;option value="{{ choice.id }}"&amp;gt;{{ choice.name }}&amp;lt;/option&amp;gt;
                {% endif %}
            {% endfor %}
        &amp;lt;/select&amp;gt;
              &amp;lt;input name="name" type="text" id="search-by" class="autocomplete" placeholder="Search by name..."&amp;gt;

    &amp;lt;/div&amp;gt;
  
  
  
      {# &amp;lt;div&amp;gt;
        &amp;lt;input name="name" type="text" id="search-by" class="autocomplete" placeholder="Search by name..."&amp;gt;
    &amp;lt;/div&amp;gt; #}
  &amp;lt;div class="button button-decor" input id="submit-button" type="submit" value="Search"&amp;gt;Search&amp;lt;/div&amp;gt;
  
  {# &amp;lt;div class="button button-decor"&amp;gt;&amp;lt;input type="button" onclick="location.href='http://21908587.hs-sites.com/uson-local-support';" value="Show All" /&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;div class="button button-decor"&amp;gt;&amp;lt;input type="button" onclick="location.href='http://21908587.hs-sites.com/uson-local-support-0';" value="View International Consultants" /&amp;gt;&amp;lt;/div&amp;gt; #}
    
    &amp;lt;div class="button button-decor" onclick="location.href='http://21908587.hs-sites.com/uson-local-support';"&amp;gt;Show All&amp;lt;/div&amp;gt;
  &amp;lt;div class="button button-decor-2" onclick="location.href='http://21908587.hs-sites.com/uson-local-support-0';"&amp;gt;View International Consultants&amp;lt;/div&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;!-- sets the different query parameters using submitted input for hubdb query --&amp;gt;
{% set queryparam = "" %}
{% if request.query_dict.state in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"] and request.query_dict.name == "" %}
    {% set queryparam = queryparam ~ "&amp;amp;state=__contains"~request.query_dict.state|urlencode %}

{% endif %}

{% if request.query_dict.state in ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50"] and request.query_dict.name != "" %}
    {% set queryparam = queryparam~"&amp;amp;state="~request.query_dict.state|urlencode~"&amp;amp;zip__icontains="~request.query_dict.zip|urlencode %}
{% endif %}
{% if request.query_dict.state == "show-all" and request.query_dict.name != "" %}
{% endif %}



{% set table = hubdb_table_rows(5440613, queryparam) %}





&amp;lt;!-- Check if table exists, set sort by state --&amp;gt;
{% if table == [] %}
    &amp;lt;p class='align-center'&amp;gt;Sorry, no listings found for that search. Try changing your filter and search again.&amp;lt;/p&amp;gt;
{% else %}
  {% for row in table|sort(False, False, 'state') %}
&amp;lt;div class="consultant-listing"&amp;gt;
      &amp;lt;h2&amp;gt;{{ row["name"] }}&amp;lt;/h2&amp;gt;

 &amp;lt;div class="information"&amp;gt;
        {% for row in table %}
    {% for state in row.state %}
   &amp;lt;div class="fac_state"&amp;gt;{{ row.state.name|pprint }} &amp;lt;/div&amp;gt; 
  {% endfor %}
   {% endfor %}

 &amp;lt;div class="fac_city""&amp;gt;{{ row["city"] }}, {{ row["zip"] }}&amp;lt;/div&amp;gt;  
                  &amp;lt;i class="fas fa-phone"&amp;gt;&amp;lt;/i&amp;gt; {{ row["phone"] }}

              
              &amp;lt;br&amp;gt; &amp;lt;i class="fas fa-link"&amp;gt;&amp;lt;/i&amp;gt; &amp;lt;a href="{{row["website"]}}"&amp;gt;Website&amp;lt;/a&amp;gt; 
                &amp;lt;br&amp;gt;&amp;lt;i class="fas fa-envelope"&amp;gt;&amp;lt;/i&amp;gt; &amp;lt;a href="mailto:{{ row["email"] }}"&amp;gt;{{ row["email"] }}&amp;lt;/a&amp;gt;
           
            &amp;lt;div class="location_details"&amp;gt;{{ row["location_details"] }}&amp;lt;/div&amp;gt;
   &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
  {% endfor %}
                                         {% endif %}&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;row.state.name is printing out null, so there is no value.&lt;/P&gt;&lt;P&gt;When I put down {{row.state}} it renders:&lt;/P&gt;&lt;DIV class=""&gt;[{id=3, name='Arizona', order=2}, {id=6, name='Colorado', order=5}]&lt;/DIV&gt;&lt;DIV class=""&gt;[{id=3, name='Arizona', order=2}, {id=6, name='Colorado', order=5}]&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;How do I properly extract 'name'?&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-08-04 at 11.04.01 AM.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/72171iCE6709DF60753F62/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-08-04 at 11.04.01 AM.png" alt="Screen Shot 2022-08-04 at 11.04.01 AM.png" /&gt;&lt;/span&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;Here is a screenshot of my HubDB table. So 'State' is multi-select now instead of select. I just want to extract the values of State and render it correctly on the webpage.&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I also checked here:&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/CMS-Development/How-to-Get-Filtered-Data-From-HubDB-from-Multiple-Select-Column/m-p/257682" target="_blank" rel="noopener"&gt;https://community.hubspot.com/t5/CMS-Development/How-to-Get-Filtered-Data-From-HubDB-from-Multiple-Select-Column/m-p/257682&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;...But maybe I need a second pair of eyes to check my code?&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Thank you!&lt;/DIV&gt;</description>
      <pubDate>Thu, 04 Aug 2022 18:06:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675834#M29895</guid>
      <dc:creator>unicorndev</dc:creator>
      <dc:date>2022-08-04T18:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Resolve Property 'name'</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675864#M29898</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/388114"&gt;@unicorndev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{{row.state}} is an array and your code looks like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{% for row in table %}&lt;BR /&gt;{% for state in row.state %}&lt;BR /&gt;&amp;lt;div class="fac_state"&amp;gt;{{ row.state.name|pprint }} &amp;lt;/div&amp;gt; &lt;BR /&gt;{% endfor %}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the output if you do this instead:&lt;/P&gt;
&lt;P&gt;{% for row in table %}&lt;BR /&gt;{% for state in row.state %}&lt;BR /&gt;&amp;lt;div class="fac_state"&amp;gt;{{state.name|pprint }}&lt;/P&gt;
&lt;P&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;{% endfor %}&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 18:56:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675864#M29898</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2022-08-04T18:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Resolve Property 'name'</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675928#M29902</link>
      <description>&lt;P&gt;Thanks! I took out the forloop going through each row in the table because it was looping and printing out all states in every company name, even for fields it didn't belong to lol. I appreciate that so much, thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 20:23:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675928#M29902</guid>
      <dc:creator>unicorndev</dc:creator>
      <dc:date>2022-08-04T20:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Resolve Property 'name'</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675941#M29904</link>
      <description>&lt;P&gt;And sorry one more question... since it has multiple states, I want to add a comma between each state with display: inline so it is all on one line. Any way I can do that?&lt;/P&gt;&lt;P&gt;They're just block elements right now &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-08-04 at 1.36.30 PM.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/72185i124A2613CDE8EE4F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-08-04 at 1.36.30 PM.png" alt="Screen Shot 2022-08-04 at 1.36.30 PM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2022 20:38:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/675941#M29904</guid>
      <dc:creator>unicorndev</dc:creator>
      <dc:date>2022-08-04T20:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot Resolve Property 'name'</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/676118#M29913</link>
      <description>&lt;P&gt;Which words from your screenshot would you like next to each other?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2022 07:54:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Cannot-Resolve-Property-name/m-p/676118#M29913</guid>
      <dc:creator>Teun</dc:creator>
      <dc:date>2022-08-05T07:54:57Z</dc:date>
    </item>
  </channel>
</rss>

