<?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: Need help on filtering data from the server and not from the client. in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/need-help-on-filtering-data-from-the-server-and/m-p/1288622#M7806</link>
    <description>&lt;P&gt;You could use a Data Expression and hard-code a filter into it. This would effectively put a &lt;STRONG&gt;where &lt;/STRONG&gt;clause on your queries right out of the gate, thereby limiting the incoming data.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(
  Portal('your portal url'),
  'service itemid',
  0, // or whatever the layer index is
  ['fields', 'you', 'need'],
  false // or true, if you actually need the geometry
)

return Filter(
  fs,
  `${some_date_field} &amp;gt;= DATE '2023-05-10 00:00:00' + INTERVAL '01' DAY`
)&lt;/LI-CODE&gt;&lt;P&gt;You can make this query sort of dynamic, too, by supplying a calculated value for the date, or using "CURRENT_TIMESTAMP".&lt;/P&gt;&lt;P&gt;Oh, but data expression layers can't show up on the map, so this might be a dealbreaker.&lt;/P&gt;&lt;P&gt;If you need the filter to change based on user input, then this &lt;EM&gt;probably &lt;/EM&gt;isn't possible.&lt;/P&gt;&lt;P&gt;Another thought: if the category selector is set to "show only when filtered" on the map layer, does it behave any differently?&lt;/P&gt;</description>
    <pubDate>Fri, 12 May 2023 15:38:36 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2023-05-12T15:38:36Z</dc:date>
    <item>
      <title>Need help on filtering data from the server and not from the client.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/need-help-on-filtering-data-from-the-server-and/m-p/1288018#M7803</link>
      <description>&lt;P&gt;ArcGIS Enterprise 11&lt;/P&gt;&lt;P&gt;Dashboards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a very large table, that only needs to be viewed by a certain value at any given moment. For example, if I have a million rows with points, I only need to show the 250 rows that belong to the date 5/10/22.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have it working in that way currently with a metadata table, and the category selectors, but the dashboard is super slow because it loads EVERY point, and then filters. I can see it loading the points in the chrome developer tools network logs. Is there any way to make the map only load what its being filtered by?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've seen query layers with parameters, but these need to be predefined from my knowledge. I don't want to have to define more when the metadata table changes.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any suggestions!&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 00:39:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/need-help-on-filtering-data-from-the-server-and/m-p/1288018#M7803</guid>
      <dc:creator>JonathanDolbee</dc:creator>
      <dc:date>2023-05-11T00:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Need help on filtering data from the server and not from the client.</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/need-help-on-filtering-data-from-the-server-and/m-p/1288622#M7806</link>
      <description>&lt;P&gt;You could use a Data Expression and hard-code a filter into it. This would effectively put a &lt;STRONG&gt;where &lt;/STRONG&gt;clause on your queries right out of the gate, thereby limiting the incoming data.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var fs = FeatureSetByPortalItem(
  Portal('your portal url'),
  'service itemid',
  0, // or whatever the layer index is
  ['fields', 'you', 'need'],
  false // or true, if you actually need the geometry
)

return Filter(
  fs,
  `${some_date_field} &amp;gt;= DATE '2023-05-10 00:00:00' + INTERVAL '01' DAY`
)&lt;/LI-CODE&gt;&lt;P&gt;You can make this query sort of dynamic, too, by supplying a calculated value for the date, or using "CURRENT_TIMESTAMP".&lt;/P&gt;&lt;P&gt;Oh, but data expression layers can't show up on the map, so this might be a dealbreaker.&lt;/P&gt;&lt;P&gt;If you need the filter to change based on user input, then this &lt;EM&gt;probably &lt;/EM&gt;isn't possible.&lt;/P&gt;&lt;P&gt;Another thought: if the category selector is set to "show only when filtered" on the map layer, does it behave any differently?&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2023 15:38:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/need-help-on-filtering-data-from-the-server-and/m-p/1288622#M7806</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-05-12T15:38:36Z</dc:date>
    </item>
  </channel>
</rss>

