<?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: Finding DISTINCT features using Arcade in List widget in Operations Dashboard in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1391251#M23396</link>
    <description>&lt;P&gt;Nah, follow the link in the original post. Data Expressions are separate data sources; you can create one when you define the data source for a widget.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 16:37:39 GMT</pubDate>
    <dc:creator>jcarlson</dc:creator>
    <dc:date>2024-03-05T16:37:39Z</dc:date>
    <item>
      <title>Finding DISTINCT features using Arcade in List widget in Operations Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1153506#M21990</link>
      <description>&lt;P&gt;I am trying to create a list with only distinct features from my table in Operations Dashboard. I am using the following Arcade script:&lt;/P&gt;&lt;P&gt;var provider = Distinct($datapoint["provider_name"])&lt;BR /&gt;return {&lt;BR /&gt;attributes: {&lt;BR /&gt;provider: provider&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;In the line item template in the list, I call it using {expression/provider}.&amp;nbsp;I do not get any errors and it results in a provider name being listed, but I do not get unique names. Rather, it lists them all. Any ideas how to correct this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2022 20:05:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1153506#M21990</guid>
      <dc:creator>LindaSlattery</dc:creator>
      <dc:date>2022-03-14T20:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Finding DISTINCT features using Arcade in List widget in Operations Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1153649#M21991</link>
      <description>&lt;P&gt;The &lt;STRONG&gt;distinct &lt;/STRONG&gt;function returns either an array or a FeatureSet, depending on the input.&lt;/P&gt;&lt;P&gt;The expression you have written here is in the &lt;EM&gt;dashboard&lt;/EM&gt; &lt;EM&gt;formatting &lt;/EM&gt;profile of Arcade, which cannot do what you're trying to accomplish. You're telling it to return the distinct values of the provider name of a single datapoint. The function treats this as an array with a single item in it:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jcarlson_0-1647311277878.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/36321iC475FA337B649E83/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jcarlson_0-1647311277878.png" alt="jcarlson_0-1647311277878.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Consider using a &lt;EM&gt;Data Expression&lt;/EM&gt;, similar to &lt;A href="https://github.com/Esri/arcade-expressions/blob/master/dashboard_data/GroupByMultiStats(List).md" target="_self"&gt;this example&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Yours might look like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var portal = Portal('https://www.arcgis.com/');

var fs = FeatureSetByPortalItem(
    portal,
    'your itemid',
    0,
    ['provider_name'],
    false
);

return Distinct(fs, 'provider_name') &lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 15 Mar 2022 03:31:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1153649#M21991</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2022-03-15T03:31:48Z</dc:date>
    </item>
    <item>
      <title>Re: Finding DISTINCT features using Arcade in List widget in Operations Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1391204#M23395</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/363906"&gt;@jcarlson&lt;/a&gt;&amp;nbsp;where do we insert this code, still in the advanced formatting? I am trying to do the same thing now. it also seems like the &lt;FONT color="#FF0000"&gt;FeatureSetByPortalItem&lt;/FONT&gt;&amp;nbsp;is not active on my end. Please could you any update on this?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 16:07:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1391204#M23395</guid>
      <dc:creator>EdmundEkanem1</dc:creator>
      <dc:date>2024-03-05T16:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: Finding DISTINCT features using Arcade in List widget in Operations Dashboard</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1391251#M23396</link>
      <description>&lt;P&gt;Nah, follow the link in the original post. Data Expressions are separate data sources; you can create one when you define the data source for a widget.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 16:37:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/finding-distinct-features-using-arcade-in-list/m-p/1391251#M23396</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2024-03-05T16:37:39Z</dc:date>
    </item>
  </channel>
</rss>

