<?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: Dashboard Indicator data expression 'Unable to execute Arcade script' in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-data-expression-unable-to/m-p/1283918#M7722</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;. I'll keep that in mind in the future. Not sure why a scripting language only allows returning a feature set, but it is what it is.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Apr 2023 15:14:26 GMT</pubDate>
    <dc:creator>ZenMasterZeke</dc:creator>
    <dc:date>2023-04-28T15:14:26Z</dc:date>
    <item>
      <title>Dashboard Indicator data expression 'Unable to execute Arcade script'</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-data-expression-unable-to/m-p/1283819#M7720</link>
      <description>&lt;P&gt;I have the Arcade code (below) in a data expression for an Indicator element. When I test it, it returns the correct value, but in the Data Expressions selection list the expression name is grayed out and has a warning icon stating 'Unable to execute Arcade Script'. Very helpful.&lt;/P&gt;&lt;P&gt;Any idea what the error is and how to fix it? Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;var p = Portal('https://myPortal/')
var fs = FeatureSetByPortalItem(
    p,
    '7hk90262c6e641c6bc9513da29fdf346',
    0,
    [
        'sample_id_dup',
        'sample_id_pre',
        'sample_id_post',
        'sample_id_other_1',
        'sample_id_other_2',
     ],
    false
    );

var dup = Count(Filter(fs, 'sample_id_dup IS NOT NULL'));    
var pre = Count(Filter(fs, 'sample_id_pre IS NOT NULL'));
var post = Count(Filter(fs, 'sample_id_post IS NOT NULL'));
var other1 = Count(Filter(fs, 'sample_id_other_1 IS NOT NULL'));
var other2 = Count(Filter(fs, 'sample_id_other_2 IS NOT NULL'));

return dup + pre + post + other1 + other2;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 13:01:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-data-expression-unable-to/m-p/1283819#M7720</guid>
      <dc:creator>ZenMasterZeke</dc:creator>
      <dc:date>2023-04-28T13:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard Indicator data expression 'Unable to execute Arcade script'</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-data-expression-unable-to/m-p/1283826#M7721</link>
      <description>&lt;P&gt;&lt;A href="https://doc.arcgis.com/en/dashboards/latest/reference/authoring-data-expressions.htm" target="_self"&gt;Data Expressions&lt;/A&gt; require that you return the results as a FeatureSet. You're just returning a number, which isn't valid. You'll have to convert your result into a FeatureSet. This &lt;A href="https://community.esri.com/t5/arcgis-dashboards-questions/arcgis-dashboard-data-expression-quot-unable-to/m-p/1052347" target="_self"&gt;post&lt;/A&gt; shows one way of doing that&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 13:26:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-data-expression-unable-to/m-p/1283826#M7721</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2023-04-28T13:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Dashboard Indicator data expression 'Unable to execute Arcade script'</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-data-expression-unable-to/m-p/1283918#M7722</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2839"&gt;@KenBuja&lt;/a&gt;&amp;nbsp;. I'll keep that in mind in the future. Not sure why a scripting language only allows returning a feature set, but it is what it is.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 15:14:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/dashboard-indicator-data-expression-unable-to/m-p/1283918#M7722</guid>
      <dc:creator>ZenMasterZeke</dc:creator>
      <dc:date>2023-04-28T15:14:26Z</dc:date>
    </item>
  </channel>
</rss>

