<?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 FeatureSetByName Not Working in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/featuresetbyname-not-working/m-p/1595283#M10885</link>
    <description>&lt;P&gt;I am working on an &lt;STRONG&gt;ArcGIS Dashboard&lt;/STRONG&gt; where I want to dynamically access the &lt;STRONG&gt;Incident_Date&lt;/STRONG&gt; field from the &lt;STRONG&gt;"TAG Point data"&lt;/STRONG&gt; layer, which is already included in my web map inside the dashboard.&lt;/P&gt;&lt;P&gt;I tried using FeatureSetByName() in an &lt;STRONG&gt;Arcade expression&lt;/STRONG&gt; within an &lt;STRONG&gt;Indicator widget&lt;/STRONG&gt;, but I keep getting errors stating that $map, $datastore, and $data are &lt;STRONG&gt;not defined&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Here are two examples of what I tried:&lt;/P&gt;&lt;PRE&gt;var fs = FeatureSetByName($map, "TAG Point data", ["Incident_Date"], false);&lt;BR /&gt;var minDate = OrderBy(fs, "Incident_Date ASC")[0].Incident_Date;&lt;BR /&gt;return Text(minDate, "MMMM dd, yyyy");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;var fs = FeatureSetByName($data, "TAG Point data", ["Incident_Date"], false);&lt;BR /&gt;var minDate = Min(fs, "Incident_Date");&lt;BR /&gt;return Text(minDate, "MMMM dd, yyyy");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;But none of these work because $map, $datastore, and $data are &lt;STRONG&gt;not recognized&lt;/STRONG&gt; in the &lt;STRONG&gt;Arcade Dashboard profile&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;What is the correct way to reference a &lt;STRONG&gt;web map layer&lt;/STRONG&gt; that is already included in my &lt;STRONG&gt;Dashboard&lt;/STRONG&gt; when using FeatureSetByName() in an &lt;STRONG&gt;Indicator widget&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Any guidance would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;@DanPatterson&lt;BR /&gt;@JenniferAcunto&lt;BR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Mar 2025 19:22:25 GMT</pubDate>
    <dc:creator>SayenaMarandi</dc:creator>
    <dc:date>2025-03-13T19:22:25Z</dc:date>
    <item>
      <title>FeatureSetByName Not Working</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/featuresetbyname-not-working/m-p/1595283#M10885</link>
      <description>&lt;P&gt;I am working on an &lt;STRONG&gt;ArcGIS Dashboard&lt;/STRONG&gt; where I want to dynamically access the &lt;STRONG&gt;Incident_Date&lt;/STRONG&gt; field from the &lt;STRONG&gt;"TAG Point data"&lt;/STRONG&gt; layer, which is already included in my web map inside the dashboard.&lt;/P&gt;&lt;P&gt;I tried using FeatureSetByName() in an &lt;STRONG&gt;Arcade expression&lt;/STRONG&gt; within an &lt;STRONG&gt;Indicator widget&lt;/STRONG&gt;, but I keep getting errors stating that $map, $datastore, and $data are &lt;STRONG&gt;not defined&lt;/STRONG&gt;.&lt;BR /&gt;&lt;BR /&gt;Here are two examples of what I tried:&lt;/P&gt;&lt;PRE&gt;var fs = FeatureSetByName($map, "TAG Point data", ["Incident_Date"], false);&lt;BR /&gt;var minDate = OrderBy(fs, "Incident_Date ASC")[0].Incident_Date;&lt;BR /&gt;return Text(minDate, "MMMM dd, yyyy");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;var fs = FeatureSetByName($data, "TAG Point data", ["Incident_Date"], false);&lt;BR /&gt;var minDate = Min(fs, "Incident_Date");&lt;BR /&gt;return Text(minDate, "MMMM dd, yyyy");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;But none of these work because $map, $datastore, and $data are &lt;STRONG&gt;not recognized&lt;/STRONG&gt; in the &lt;STRONG&gt;Arcade Dashboard profile&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;What is the correct way to reference a &lt;STRONG&gt;web map layer&lt;/STRONG&gt; that is already included in my &lt;STRONG&gt;Dashboard&lt;/STRONG&gt; when using FeatureSetByName() in an &lt;STRONG&gt;Indicator widget&lt;/STRONG&gt;?&lt;/P&gt;&lt;P&gt;Any guidance would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;@DanPatterson&lt;BR /&gt;@JenniferAcunto&lt;BR /&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 19:22:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/featuresetbyname-not-working/m-p/1595283#M10885</guid>
      <dc:creator>SayenaMarandi</dc:creator>
      <dc:date>2025-03-13T19:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: FeatureSetByName Not Working</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/featuresetbyname-not-working/m-p/1595380#M10888</link>
      <description>&lt;P&gt;To return the minimum date, you'll have to use FeatureSetByPortalItem to get the layer.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2025 19:51:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/featuresetbyname-not-working/m-p/1595380#M10888</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2025-03-13T19:51:10Z</dc:date>
    </item>
  </channel>
</rss>

