<?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 How to filter a HubDB query with a column value in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/8673#M891</link>
    <description>&lt;P&gt;Hi developers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a listing page using HubDB,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/1924i8A98B58204E94E13/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here how i can fetch the rows with popularity "popular" with limit 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have tried some queries but none of them are working, can anyone help me with some queries&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Wed, 15 Mar 2017 13:31:05 GMT</pubDate>
    <dc:creator>subin</dc:creator>
    <dc:date>2017-03-15T13:31:05Z</dc:date>
    <item>
      <title>How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/8673#M891</link>
      <description>&lt;P&gt;Hi developers&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am developing a listing page using HubDB,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/1924i8A98B58204E94E13/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here how i can fetch the rows with popularity "popular" with limit 5.&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have tried some queries but none of them are working, can anyone help me with some queries&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 15 Mar 2017 13:31:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/8673#M891</guid>
      <dc:creator>subin</dc:creator>
      <dc:date>2017-03-15T13:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/14339#M1351</link>
      <description>&lt;PRE&gt;{{ hubdb_table_rows(&amp;lt;tableId&amp;gt;, ‘popularity=&amp;lt;optionid&amp;gt;&amp;amp;limit=5’) }}&lt;/PRE&gt;
&lt;P&gt;where &amp;lt;optionid&amp;gt; is the id of the "popular" or "not popular" option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;See&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#hubdb-table-rows" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/cms/hubl/functions#hubdb-table-rows&lt;/A&gt; for thorough documentation.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 21:19:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/14339#M1351</guid>
      <dc:creator>boulter</dc:creator>
      <dc:date>2021-01-22T21:19:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/14812#M1405</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/754"&gt;@boulter&lt;/a&gt;&amp;nbsp;this solved my problem, i have directly used the dropdown value&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.hubspot.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;img id="heart" class="emoticon emoticon-heart" src="https://community.hubspot.com/i/smilies/16x16_heart.png" alt="Heart" title="Heart" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2017 08:48:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/14812#M1405</guid>
      <dc:creator>subin</dc:creator>
      <dc:date>2017-05-09T08:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/171125#M4410</link>
      <description>&lt;P&gt;How do you determine what the &amp;lt;optionid&amp;gt; is for the "popular" or "not popular" dropdown options in the table?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to create a custom module with “Choice options” that allow you to filter and show options on a page based on what is selected in the HubDB table's column. For example, I want all of&amp;nbsp;our&amp;nbsp;upcoming “Essentials” classes to be listed on a page using a custom module. Not sure I am doing this correctly...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe the value in the custom module would be something like…&lt;/P&gt;&lt;P&gt;{{ hubdb_table_rows (674971, ‘select_course=&lt;FONT color="#FF0000"&gt;&amp;lt;optionid&amp;gt;&lt;/FONT&gt;') }}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="select_course_dropdown.gif" style="width: 358px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/7348i0248B3F654D8837C/image-size/large?v=v2&amp;amp;px=999" role="button" title="select_course_dropdown.gif" alt="select_course_dropdown.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2018 17:50:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/171125#M4410</guid>
      <dc:creator>leckerman</dc:creator>
      <dc:date>2018-01-15T17:50:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/171866#M4415</link>
      <description>&lt;P&gt;Sure, you can use the&amp;nbsp;&lt;FONT face="andale mono,times"&gt;hubdb_table_column&lt;/FONT&gt; hubl tag to get the list of options and then the&amp;nbsp;&lt;SPAN&gt;&lt;FONT face="andale mono,times"&gt;getOptionByName&lt;/FONT&gt; method to get the option value&lt;/SPAN&gt;. See &lt;A href="http://designers.hubspot.com/docs/tools/hubdb" target="_blank"&gt;http://designers.hubspot.com/docs/tools/hubdb&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 16:13:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/171866#M4415</guid>
      <dc:creator>boulter</dc:creator>
      <dc:date>2018-01-16T16:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/171927#M4416</link>
      <description>&lt;P&gt;Can you tell me what I am doing wrong with these custom module values? How/where do I add what other columns in the table I want to be shown based on the course selected? Is this close? Not&amp;nbsp;working as is...&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Value 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{{ hubdb_table_column (674971, select_course=getOptionByName("Essentials") }}&amp;lt;h3&amp;gt;{{ row.course_name }}&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Location:&amp;lt;/strong&amp;gt; {{ row.class_location }}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Date:&amp;lt;/strong&amp;gt; {{row.date|datetimeformat('%A, %B %e, %Y') }}&amp;lt;/p&amp;gt;{% endfor %}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{{ hubdb_table_column (674971, select_course=getOptionByName("Drawings") }}&amp;lt;h3&amp;gt;{{ row.course_name }}&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Location:&amp;lt;/strong&amp;gt; {{ row.class_location }}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Date:&amp;lt;/strong&amp;gt; {{row.date|datetimeformat('%A, %B %e, %Y') }}&amp;lt;/p&amp;gt;{% endfor %}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN&gt;Value 3:&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;{{ hubdb_table_column (674971, select_course=getOptionByName("Composer") }}&amp;lt;h3&amp;gt;{{ row.course_name }}&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Location:&amp;lt;/strong&amp;gt; {{ row.class_location }}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Date:&amp;lt;/strong&amp;gt; {{row.date|datetimeformat('%A, %B %e, %Y') }}&amp;lt;/p&amp;gt;{% endfor %}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 17:47:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/171927#M4416</guid>
      <dc:creator>leckerman</dc:creator>
      <dc:date>2018-01-16T17:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/172008#M4417</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;
&lt;PRE&gt;{% set col = hubdb_table_column (674971, &amp;lt;columnId&amp;gt;) %} 

{% set selected_course = col.getOptionByName("Essentials") %}

{{ selected_course }}
 &lt;/PRE&gt;</description>
      <pubDate>Tue, 16 Jan 2018 18:21:02 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/172008#M4417</guid>
      <dc:creator>boulter</dc:creator>
      <dc:date>2018-01-16T18:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter a HubDB query with a column value</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/172092#M4422</link>
      <description>&lt;P&gt;Is the &amp;lt;columnId&amp;gt; just the name of the column select_course? I can't find id numbers for the table columns. Tried inserting the following into the custom module value choices and then then name of the widget {{ widget.select_course }} into the "Edit" field. Nothing shows up in preview.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value 1:&lt;/STRONG&gt;&lt;BR /&gt;{% set col = hubdb_table_column (674971, select_course) %} {% set select_course = col.getOptionByName("Essentials") %}{{ select_course }}&amp;lt;h3&amp;gt;{{ row.course_name }}&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Location:&amp;lt;/strong&amp;gt; {{ row.class_location }}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Date:&amp;lt;/strong&amp;gt; {{row.date|datetimeformat('%A, %B %e, %Y') }}&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Value 2:&lt;/STRONG&gt;&lt;BR /&gt;{% set col = hubdb_table_column (674971, select_course) %} {% set select_course = col.getOptionByName("Drawings") %}{{ select_course }}&amp;lt;h3&amp;gt;{{ row.course_name }}&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Location:&amp;lt;/strong&amp;gt; {{ row.class_location }}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Date:&amp;lt;/strong&amp;gt; {{row.date|datetimeformat('%A, %B %e, %Y') }}&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Value 3:&lt;/STRONG&gt;&lt;BR /&gt;{% set col = hubdb_table_column (674971, select_course) %} {% set select_course = col.getOptionByName("Composer") %}{{ select_course }}&amp;lt;h3&amp;gt;{{ row.course_name }}&amp;lt;/h3&amp;gt;&amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Location:&amp;lt;/strong&amp;gt; {{ row.class_location }}&amp;lt;br&amp;gt;&amp;lt;strong&amp;gt;Date:&amp;lt;/strong&amp;gt; {{row.date|datetimeformat('%A, %B %e, %Y') }}&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 19:45:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-filter-a-HubDB-query-with-a-column-value/m-p/172092#M4422</guid>
      <dc:creator>leckerman</dc:creator>
      <dc:date>2018-01-16T19:45:50Z</dc:date>
    </item>
  </channel>
</rss>

