<?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 Combine HubDB results and filter. in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Combine-HubDB-results-and-filter/m-p/215068#M9455</link>
    <description>&lt;P&gt;I'm pulling data from 3 separate HubDB tables and combining them into one data set, like so:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{% set tbl1 = hubdb_table_rows(123) %}&lt;BR /&gt;{% set tbl2 = hubdb_table_rows(456) %}&lt;BR /&gt;{% set tbl3 = hubdb_table_rows(789) %}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;{% set all_tbls = (tbl1 + tbl2 + tbl3) %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to sort all_tbls by the NAME&amp;nbsp; field that exists in all of the tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using the |sort filter when combining the results:&lt;/P&gt;&lt;P&gt;{% set&amp;nbsp;&lt;SPAN&gt;all_tbls&lt;/SPAN&gt; = (basic_rows + video_rows + webinar_rows)|sort('hs_name') %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I tried different references to the field (hs_name, name, NAME, Name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using the |sort filter within the "for" statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{% for row in&amp;nbsp;&lt;SPAN&gt;all_tbls&lt;/SPAN&gt;|sort('name') %}&lt;BR /&gt;{{ row.name }}&lt;BR /&gt;{% endfor %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neither seems to work and I cannot find documentation on this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to sort the combined results?&lt;/P&gt;</description>
    <pubDate>Mon, 05 Nov 2018 18:39:10 GMT</pubDate>
    <dc:creator>vperoza</dc:creator>
    <dc:date>2018-11-05T18:39:10Z</dc:date>
    <item>
      <title>Combine HubDB results and filter.</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Combine-HubDB-results-and-filter/m-p/215068#M9455</link>
      <description>&lt;P&gt;I'm pulling data from 3 separate HubDB tables and combining them into one data set, like so:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{% set tbl1 = hubdb_table_rows(123) %}&lt;BR /&gt;{% set tbl2 = hubdb_table_rows(456) %}&lt;BR /&gt;{% set tbl3 = hubdb_table_rows(789) %}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;{% set all_tbls = (tbl1 + tbl2 + tbl3) %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd like to sort all_tbls by the NAME&amp;nbsp; field that exists in all of the tables.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using the |sort filter when combining the results:&lt;/P&gt;&lt;P&gt;{% set&amp;nbsp;&lt;SPAN&gt;all_tbls&lt;/SPAN&gt; = (basic_rows + video_rows + webinar_rows)|sort('hs_name') %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I tried different references to the field (hs_name, name, NAME, Name)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried using the |sort filter within the "for" statement:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{% for row in&amp;nbsp;&lt;SPAN&gt;all_tbls&lt;/SPAN&gt;|sort('name') %}&lt;BR /&gt;{{ row.name }}&lt;BR /&gt;{% endfor %}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Neither seems to work and I cannot find documentation on this.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone know how to sort the combined results?&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 18:39:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Combine-HubDB-results-and-filter/m-p/215068#M9455</guid>
      <dc:creator>vperoza</dc:creator>
      <dc:date>2018-11-05T18:39:10Z</dc:date>
    </item>
    <item>
      <title>Re: Combine HubDB results and filter.</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Combine-HubDB-results-and-filter/m-p/215072#M9458</link>
      <description>&lt;P&gt;I just solved my own problem, so I'm sharing it here. This is the solution:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{% for row in&lt;SPAN&gt;all_tbls&lt;/SPAN&gt;|sort(false, false, 'name') %}&lt;/P&gt;&lt;P&gt;{{ row.name }}&lt;/P&gt;&lt;P&gt;{% endor %}&lt;/P&gt;</description>
      <pubDate>Mon, 05 Nov 2018 18:46:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Combine-HubDB-results-and-filter/m-p/215072#M9458</guid>
      <dc:creator>vperoza</dc:creator>
      <dc:date>2018-11-05T18:46:38Z</dc:date>
    </item>
  </channel>
</rss>

