<?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: How to Filter HubDB based on select list in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/302008#M14264</link>
    <description>&lt;P&gt;Hi&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;You could include multiple options from a "Select" column using the "in" filter. Just for reference we have documentation on the HubL syntax here: &lt;A href="https://designers.hubspot.com/docs/tools/hubdb" target="_blank"&gt;https://designers.hubspot.com/docs/tools/hubdb&lt;/A&gt;. And the supported filters are documented here: &lt;A href="https://developers.hubspot.com/docs/methods/hubdb/v2/get_table_rows" target="_blank"&gt;https://developers.hubspot.com/docs/methods/hubdb/v2/get_table_rows&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for example if your column's name is "availability", you could run your filter like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% for row in hubdb_table_rows(&amp;lt;tableId&amp;gt;, "availability__in=Reserved,Sold") %}
  &amp;lt;p&amp;gt;The availability for {{ row.name }} is {{ row.availability.name }}.&amp;lt;/p&amp;gt;
{% endfor %}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will print out the rows that have the options you've selected in your "Select" column. Hope that helps! Let me know if you have questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Nov 2019 21:52:56 GMT</pubDate>
    <dc:creator>lscanlan</dc:creator>
    <dc:date>2019-11-13T21:52:56Z</dc:date>
    <item>
      <title>How to Filter HubDB based on select list</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/300348#M14204</link>
      <description>&lt;P&gt;I currently have a select list with 4 options:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Available&lt;/LI&gt;&lt;LI&gt;Unavailable&lt;/LI&gt;&lt;LI&gt;Reserved&lt;/LI&gt;&lt;LI&gt;Sold&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I have managed to filter the table so each row will only display if Available is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{% set table = hubdb_table_rows(module.table_id, "&amp;amp;status=Available") %}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is it possible have an 'or' option on the filter for example 'only show if the status is Available &lt;U&gt;or&lt;/U&gt; Reserved' ?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 09:20:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/300348#M14204</guid>
      <dc:creator>ben-duchy</dc:creator>
      <dc:date>2019-11-05T09:20:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to Filter HubDB based on select list</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/302008#M14264</link>
      <description>&lt;P&gt;Hi&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;You could include multiple options from a "Select" column using the "in" filter. Just for reference we have documentation on the HubL syntax here: &lt;A href="https://designers.hubspot.com/docs/tools/hubdb" target="_blank"&gt;https://designers.hubspot.com/docs/tools/hubdb&lt;/A&gt;. And the supported filters are documented here: &lt;A href="https://developers.hubspot.com/docs/methods/hubdb/v2/get_table_rows" target="_blank"&gt;https://developers.hubspot.com/docs/methods/hubdb/v2/get_table_rows&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for example if your column's name is "availability", you could run your filter like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;{% for row in hubdb_table_rows(&amp;lt;tableId&amp;gt;, "availability__in=Reserved,Sold") %}
  &amp;lt;p&amp;gt;The availability for {{ row.name }} is {{ row.availability.name }}.&amp;lt;/p&amp;gt;
{% endfor %}&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That will print out the rows that have the options you've selected in your "Select" column. Hope that helps! Let me know if you have questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Nov 2019 21:52:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/302008#M14264</guid>
      <dc:creator>lscanlan</dc:creator>
      <dc:date>2019-11-13T21:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to Filter HubDB based on select list</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/302092#M14273</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/5408"&gt;@lscanlan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes you're right, I figured this out a couple of days ago...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{% set table = hubdb_table_rows(module.table_id, "&amp;amp;status__in=Available,Reserved&amp;amp;orderBy=status&amp;amp;orderBy=class") %}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Works perfectly!&amp;nbsp;&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;/P&gt;</description>
      <pubDate>Thu, 14 Nov 2019 10:50:12 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/302092#M14273</guid>
      <dc:creator>ben-duchy</dc:creator>
      <dc:date>2019-11-14T10:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to Filter HubDB based on select list</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/402505#M20714</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/5408"&gt;@lscanlan&lt;/a&gt;&amp;nbsp;- This helped tremendously! It would be fantastical if there were more examples/explination (for us non-hard core coders) on filters page (&lt;A href="https://legacydocs.hubspot.com/docs/methods/hubdb/v2/get_table_rows" target="_blank" rel="noopener"&gt;https://legacydocs.hubspot.com/docs/methods/hubdb/v2/get_table_rows&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 22:36:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-Filter-HubDB-based-on-select-list/m-p/402505#M20714</guid>
      <dc:creator>Graham_USMC</dc:creator>
      <dc:date>2021-01-22T22:36:51Z</dc:date>
    </item>
  </channel>
</rss>

