<?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 Arcade Data Expressions: Unable to execute Arcade script in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-unable-to-execute-arcade/m-p/1085981#M4904</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone provide some insight as to why I am unable to execute my Arcade Expression? I can successfully test it but it will not let me execute it. I just learned how to use Data Expressions today with help from this community so I am very green.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what my data expression looks like, while returning the correct number for "Count":&lt;/P&gt;&lt;P&gt;var features = FeatureSetByPortalItem(Portal('&lt;A href="https://arcgis.com" target="_blank"&gt;https://arcgis.com&lt;/A&gt;'), '5a735badf3114a3ba63e2a01b3cb1a68', 0, ['ACTIVE_ELE'], false);&lt;BR /&gt;Count(Features);&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JennyKuan_0-1628114618262.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/20204i088F1DBBF8B1ED94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JennyKuan_0-1628114618262.png" alt="JennyKuan_0-1628114618262.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then, when I press done and return to the previous page, I get this message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JennyKuan_1-1628114694564.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/20205i1A3CF4D341793299/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JennyKuan_1-1628114694564.png" alt="JennyKuan_1-1628114694564.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't the final script I want to use but I'm just playing with things for the time being.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Jenny&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 04 Aug 2021 22:05:18 GMT</pubDate>
    <dc:creator>JennyKuan</dc:creator>
    <dc:date>2021-08-04T22:05:18Z</dc:date>
    <item>
      <title>Arcade Data Expressions: Unable to execute Arcade script</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-unable-to-execute-arcade/m-p/1085981#M4904</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Can anyone provide some insight as to why I am unable to execute my Arcade Expression? I can successfully test it but it will not let me execute it. I just learned how to use Data Expressions today with help from this community so I am very green.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's what my data expression looks like, while returning the correct number for "Count":&lt;/P&gt;&lt;P&gt;var features = FeatureSetByPortalItem(Portal('&lt;A href="https://arcgis.com" target="_blank"&gt;https://arcgis.com&lt;/A&gt;'), '5a735badf3114a3ba63e2a01b3cb1a68', 0, ['ACTIVE_ELE'], false);&lt;BR /&gt;Count(Features);&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JennyKuan_0-1628114618262.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/20204i088F1DBBF8B1ED94/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JennyKuan_0-1628114618262.png" alt="JennyKuan_0-1628114618262.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Then, when I press done and return to the previous page, I get this message:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JennyKuan_1-1628114694564.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/20205i1A3CF4D341793299/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JennyKuan_1-1628114694564.png" alt="JennyKuan_1-1628114694564.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This isn't the final script I want to use but I'm just playing with things for the time being.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;Jenny&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 22:05:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-unable-to-execute-arcade/m-p/1085981#M4904</guid>
      <dc:creator>JennyKuan</dc:creator>
      <dc:date>2021-08-04T22:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expressions: Unable to execute Arcade script</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-unable-to-execute-arcade/m-p/1086080#M4906</link>
      <description>&lt;P&gt;Hi Jenny,&lt;/P&gt;&lt;P&gt;The expression must return a FeatureSet.&amp;nbsp;&amp;nbsp;&lt;A href="https://doc.arcgis.com/en/dashboards/get-started/create-data-expressions.htm" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/dashboards/get-started/create-data-expressions.htm&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you just need a count in something like an indicator, I'd just have the expression return the featureSet as-is, then have a Count on the indicator.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/arcade/guide/types/?rsource=https%3A%2F%2Flinks.esri.com%2Fdashboards-help%2Farcade-featuresets#featureset" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/arcade/guide/types/?rsource=https%3A%2F%2Flinks.esri.com%2Fdashboards-help%2Farcade-featuresets#featureset&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/dashboards/get-started/create-data-expressions.htm" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/dashboards/get-started/create-data-expressions.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/arcade-expressions/tree/master/dashboard_data?rsource=https%3A%2F%2Flinks.esri.com%2Fdashboards-help%2Fsample-data-expressions" target="_blank" rel="noopener"&gt;https://github.com/Esri/arcade-expressions/tree/master/dashboard_data?rsource=https%3A%2F%2Flinks.esri.com%2Fdashboards-help%2Fsample-data-expressions&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/dashboards/reference/authoring-data-expressions.htm" target="_blank" rel="noopener"&gt;https://doc.arcgis.com/en/dashboards/reference/authoring-data-expressions.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Aug 2021 09:47:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-unable-to-execute-arcade/m-p/1086080#M4906</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-08-05T09:47:32Z</dc:date>
    </item>
  </channel>
</rss>

