<?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: Show multiple HubDB field options on webpage in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163282#M43238</link>
    <description>&lt;P&gt;You can definitely combine multiple HubDB field option calls into a single list, especially if you’re just trying to render them all in one output block.&lt;/P&gt;
&lt;P&gt;If the goal is to &lt;STRONG&gt;merge the two lists into one loop, you can use the + operator in HubL, like this:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;{% set bedrooms_list = hubdb_table_column(module.test_hubdb, "bedrooms").options %} {% set floors_list = hubdb_table_column(module.test_hubdb, "floors").options %} {% set combined_list = bedrooms_list + floors_list %}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;ul&amp;gt;&lt;BR /&gt;{% for choice in combined_list %}&lt;BR /&gt;&amp;lt;li&amp;gt;{{ choice.name }}&amp;lt;/li&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/ul&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;This will output all the options from both &lt;SPAN class=""&gt;bedrooms and floors in one unified list.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;Hope that helps,&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;Cheers.&lt;/P&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 11 Jun 2025 09:45:29 GMT</pubDate>
    <dc:creator>shamaleyte</dc:creator>
    <dc:date>2025-06-11T09:45:29Z</dc:date>
    <item>
      <title>Show multiple HubDB field options on webpage</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163254#M43237</link>
      <description>&lt;P&gt;I'm creating a new module that displays the options from a specific HubDB field and I would like to know whether it's possible to combine multiple calls or if they have to remain seperate?&lt;BR /&gt;&lt;BR /&gt;Current HubDB call examples:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set bedrooms_list = hubdb_table_column(module.test_hubdb, "bedrooms").options %}

{% set floors_list = hubdb_table_column(module.test_hubdb, "floors").options %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Result:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% for choice in bedroom_list %}
&amp;lt;li&amp;gt;{{ choice.name }}&amp;lt;/li&amp;gt;
{% endfor %}

{% for choice in floors_list %}
&amp;lt;li&amp;gt;{{ choice.name }}&amp;lt;/li&amp;gt;
{% endfor %}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Any guidence is appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 08:54:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163254#M43237</guid>
      <dc:creator>ben-duchy</dc:creator>
      <dc:date>2025-06-11T08:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: Show multiple HubDB field options on webpage</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163282#M43238</link>
      <description>&lt;P&gt;You can definitely combine multiple HubDB field option calls into a single list, especially if you’re just trying to render them all in one output block.&lt;/P&gt;
&lt;P&gt;If the goal is to &lt;STRONG&gt;merge the two lists into one loop, you can use the + operator in HubL, like this:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;{% set bedrooms_list = hubdb_table_column(module.test_hubdb, "bedrooms").options %} {% set floors_list = hubdb_table_column(module.test_hubdb, "floors").options %} {% set combined_list = bedrooms_list + floors_list %}&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;lt;ul&amp;gt;&lt;BR /&gt;{% for choice in combined_list %}&lt;BR /&gt;&amp;lt;li&amp;gt;{{ choice.name }}&amp;lt;/li&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/ul&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;This will output all the options from both &lt;SPAN class=""&gt;bedrooms and floors in one unified list.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;Hope that helps,&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class=""&gt;Cheers.&lt;/P&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 09:45:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163282#M43238</guid>
      <dc:creator>shamaleyte</dc:creator>
      <dc:date>2025-06-11T09:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Show multiple HubDB field options on webpage</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163289#M43239</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/77911"&gt;@shamaleyte&lt;/a&gt;, good idea, but is there a way to combine them on the same call for example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set item_list = hubdb_table_column(module.test_hubdb, "bedrooms", "floors").options %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason for this is because I have around 8 'list' field types in the database that I want to display on my webpage and I understand that too many calls may affect page speed.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 09:54:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163289#M43239</guid>
      <dc:creator>ben-duchy</dc:creator>
      <dc:date>2025-06-11T09:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Show multiple HubDB field options on webpage</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163295#M43241</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/60000"&gt;@ben-duchy&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Calls via HubL methods do not affect the page load performance as they are managed by the server before the page loads &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So you are good to make multiple calls as long as you do not hit the limitation of max. number of calls.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Otherwise, there is no way to make a single call to fetch multiple HubDB table content.&lt;BR /&gt;&lt;BR /&gt;Hope that helps!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 10:03:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163295#M43241</guid>
      <dc:creator>shamaleyte</dc:creator>
      <dc:date>2025-06-11T10:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Show multiple HubDB field options on webpage</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163296#M43242</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/60000"&gt;@ben-duchy&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately, &lt;A href="https://developers.hubspot.com/docs/reference/cms/hubl/functions#hubdb_table_column" target="_blank" rel="noopener"&gt;hubdb_table_column()&lt;/A&gt; doesn’t support fetching multiple columns in a single call like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set item_list = hubdb_table_column(module.test_hubdb, "bedrooms", "floors").options %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That syntax won't work, HubL requires separate calls per column when accessing &lt;EM&gt;.options&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But as&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/77911"&gt;@shamaleyte&lt;/a&gt;&amp;nbsp;explained, you can totally combine those option arrays after fetching them individually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also refer:&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/reference/cms/hubl/functions#hubdb_table_column" target="_blank"&gt;https://developers.hubspot.com/docs/reference/cms/hubl/functions#hubdb_table_column&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 10:08:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163296#M43242</guid>
      <dc:creator>kosalaindrasiri</dc:creator>
      <dc:date>2025-06-11T10:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: Show multiple HubDB field options on webpage</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163351#M43249</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/935114"&gt;@kosalaindrasiri&lt;/a&gt;&amp;nbsp;/&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/77911"&gt;@shamaleyte&lt;/a&gt;, that makes sense.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just one final question, with there being a limit on how many times the database can be called on one page, is it possible to use an initial call to the database for these option type calls thus reducing it to just 1 call?&lt;BR /&gt;&lt;BR /&gt;For example:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set test_database = hubdb_table_rows(1234567, "&amp;amp;limit=10000") %}

{% set bedrooms_list = hubdb_table_column(test_database, "bedrooms").options %}
{% set floors_list = hubdb_table_column(test_database, "floors").options %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Jun 2025 12:18:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1163351#M43249</guid>
      <dc:creator>ben-duchy</dc:creator>
      <dc:date>2025-06-11T12:18:18Z</dc:date>
    </item>
    <item>
      <title>Re: Show multiple HubDB field options on webpage</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1169320#M43386</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/60000"&gt;@ben-duchy&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Great instinct.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The root problem is that the &lt;CODE&gt;hubdb_table_column&lt;/CODE&gt; function requires the table's unique ID as its input, not the array of row data that the &lt;CODE&gt;hubdb_table_rows&lt;/CODE&gt; function provides.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The HubL functions require separate calls for each set of column options. So the options offered by&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/77911"&gt;@shamaleyte&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/935114"&gt;@kosalaindrasiri&lt;/a&gt;&amp;nbsp;are spot on &lt;span class="lia-unicode-emoji" title=":raising_hands:"&gt;🙌&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Wed, 25 Jun 2025 21:21:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Show-multiple-HubDB-field-options-on-webpage/m-p/1169320#M43386</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-06-25T21:21:14Z</dc:date>
    </item>
  </channel>
</rss>

