<?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 Graphql how to filter on hubdb select column in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Graphql-how-to-filter-on-hubdb-select-column/m-p/733519#M32009</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to filter on hubdb select column: product and onderwerp:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And because it is a select column do i have to put this: $product.value ?&lt;/P&gt;
&lt;P&gt;If i dont use a variable and place hardcoded a value the filter works. But i want it based on a hubdb multi select column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#  label: "Downloads listing"
#  description: "Query that retrieves and filters downloads in different ways. When filtering by company we need to find the company first and then fetch its associated downloads. We use the directives  and @include to control which query will run. The last two queries fetch the values we use for generating the filtering options in the UI."
#  $offset: {{ request.query_dict.offset || 0 }}
#  $limit: {{ (module.cards_per_row * module.rows_per_page) || 5 }}
#  $product: {{ request.query_dict.product || '' }}
#  $onderwerp: {{ request.query_dict.onderwerp  || '' }}

query downloads_listing(
  $offset: Int, 
  $limit: Int, 
  $product_name: [HS_Enum],
  $onderwerp_text: [HS_Enum] )
  {

    HUBDB {
      # Gets vacatures when there is either no filtering, or we're filtering by location and/or department.
      downloads_filter: downloads_collection(limit: $limit, offset: $offset, filter: {product__eq: $product, onderwerp__eq: $onderwerp}) {
        items {
          name
          url
        }
        hasMore
        limit
        offset
        total
      }
      downloads_dropdown_values: downloads_collection {
        items {
          product
          onderwerp
          datum
        }
      }
    }
  }

&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;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 12:25:51 GMT</pubDate>
    <dc:creator>TDwebdev</dc:creator>
    <dc:date>2022-12-21T12:25:51Z</dc:date>
    <item>
      <title>Graphql how to filter on hubdb select column</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Graphql-how-to-filter-on-hubdb-select-column/m-p/733519#M32009</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to filter on hubdb select column: product and onderwerp:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And because it is a select column do i have to put this: $product.value ?&lt;/P&gt;
&lt;P&gt;If i dont use a variable and place hardcoded a value the filter works. But i want it based on a hubdb multi select column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#  label: "Downloads listing"
#  description: "Query that retrieves and filters downloads in different ways. When filtering by company we need to find the company first and then fetch its associated downloads. We use the directives  and @include to control which query will run. The last two queries fetch the values we use for generating the filtering options in the UI."
#  $offset: {{ request.query_dict.offset || 0 }}
#  $limit: {{ (module.cards_per_row * module.rows_per_page) || 5 }}
#  $product: {{ request.query_dict.product || '' }}
#  $onderwerp: {{ request.query_dict.onderwerp  || '' }}

query downloads_listing(
  $offset: Int, 
  $limit: Int, 
  $product_name: [HS_Enum],
  $onderwerp_text: [HS_Enum] )
  {

    HUBDB {
      # Gets vacatures when there is either no filtering, or we're filtering by location and/or department.
      downloads_filter: downloads_collection(limit: $limit, offset: $offset, filter: {product__eq: $product, onderwerp__eq: $onderwerp}) {
        items {
          name
          url
        }
        hasMore
        limit
        offset
        total
      }
      downloads_dropdown_values: downloads_collection {
        items {
          product
          onderwerp
          datum
        }
      }
    }
  }

&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 12:25:51 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Graphql-how-to-filter-on-hubdb-select-column/m-p/733519#M32009</guid>
      <dc:creator>TDwebdev</dc:creator>
      <dc:date>2022-12-21T12:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Graphql how to filter on hubdb select column</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Graphql-how-to-filter-on-hubdb-select-column/m-p/736573#M32103</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/175751"&gt;@TDwebdev&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for reaching out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to tag some of our experts here -&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/78983"&gt;@Indra&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/166093"&gt;@miljkovicmisa&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;do you have any thoughts for&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/175751"&gt;@TDwebdev&lt;/a&gt;&amp;nbsp;on this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Tiphaine&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jan 2023 13:27:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Graphql-how-to-filter-on-hubdb-select-column/m-p/736573#M32103</guid>
      <dc:creator>TitiCuisset</dc:creator>
      <dc:date>2023-01-03T13:27:37Z</dc:date>
    </item>
  </channel>
</rss>

