<?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: Arcade Data Expressions in ArcGIS Dashboards in Portal in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333350#M8527</link>
    <description>&lt;P&gt;Everything is in Portal and the user has to sign in to view the dashboard. So that's nice and simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the weird thing is when I test the script in the Arcade dialog it outputs the result, but when I try to use it in the indicator it says "Unable to execute Arcade script". See below.&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 14:06:30 GMT</pubDate>
    <dc:creator>GISUser74305830</dc:creator>
    <dc:date>2023-09-28T14:06:30Z</dc:date>
    <item>
      <title>Arcade Data Expressions in ArcGIS Dashboards in Portal</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333167#M8523</link>
      <description>&lt;P&gt;I've used Data Expressions in dashboards in AGO quite a bit in the past, but I'm not certain how to do so in Portal. We use Windows Authentication to login to Portal, but I can't figure out how to use the FeatureSetByPortalItem function to return the item without having to pass in credentials. I would like to just reference the Portal URL, then the item id, then have it return the feature. How do you work with data expressions in Portal?&lt;/P&gt;</description>
      <pubDate>Wed, 27 Sep 2023 21:43:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333167#M8523</guid>
      <dc:creator>GISUser74305830</dc:creator>
      <dc:date>2023-09-27T21:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expressions in ArcGIS Dashboards in Portal</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333310#M8524</link>
      <description>&lt;P&gt;You can find a whole host of examples here: &lt;A href="https://github.com/Esri/arcade-expressions/tree/master/dashboard_data" target="_blank"&gt;https://github.com/Esri/arcade-expressions/tree/master/dashboard_data&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Using Data Expressions in Portal is the same as AGOL, except that the types of functions available to you will depend on your Portal version.&lt;/P&gt;&lt;P&gt;As far as credentials, that really depends on where your expression runs and where the data layer is. If you're trying to access a protected layer, you'll need to be authenticated. If your expression was running in a Dashboard in your Portal, then you probably already are, and it won't prompt you. But if the expression ran in AGOL and you were loading a Portal layer, that's when it requires authentication, and sounds like what you're experiencing.&lt;/P&gt;&lt;P&gt;Any reason why your dashboard and data layer are in different portals, if that is the case?&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 13:15:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333310#M8524</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-09-28T13:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expressions in ArcGIS Dashboards in Portal</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333350#M8527</link>
      <description>&lt;P&gt;Everything is in Portal and the user has to sign in to view the dashboard. So that's nice and simple.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But the weird thing is when I test the script in the Arcade dialog it outputs the result, but when I try to use it in the indicator it says "Unable to execute Arcade script". See below.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 14:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333350#M8527</guid>
      <dc:creator>GISUser74305830</dc:creator>
      <dc:date>2023-09-28T14:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expressions in ArcGIS Dashboards in Portal</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333360#M8528</link>
      <description>&lt;P&gt;A Data Expression needs to return a &lt;STRONG&gt;FeatureSet&lt;/STRONG&gt;, and that's the only thing a widget knows how to work with. I'm sure it actually does execute, but since the result is a single number, the dashboard just starts waving its hands.&lt;/P&gt;&lt;P&gt;Wrap the output in a FeatureSet like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;return FeatureSet(Text({
  fields: [{name: 'the_total', type: 'esriFieldTypeInteger'}],
  geometryType: '',
  features: [{attributes:{the_total:Structure_Total}}]
}))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 14:15:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333360#M8528</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2023-09-28T14:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Data Expressions in ArcGIS Dashboards in Portal</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333368#M8529</link>
      <description>&lt;P&gt;I'll be damned! that works!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I skipped over the whole "must return a FeatureSet". I've been able to work quite a bit with Arcade in dashboards and popups without necessarily maintaining a comprehensive understanding of Globals and all that stuff, which is why the "return a FeatureSet" didn't sear into my brain.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you Josh!&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 14:20:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-data-expressions-in-arcgis-dashboards-in/m-p/1333368#M8529</guid>
      <dc:creator>GISUser74305830</dc:creator>
      <dc:date>2023-09-28T14:20:27Z</dc:date>
    </item>
  </channel>
</rss>

