<?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 - split comma separated attributs in dictionary and show in maps in ArcGIS Dashboards Questions</title>
    <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1063130#M4607</link>
    <description>&lt;P&gt;I would guess it can be done with something like&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;for (var feature in fs) {
...
//JSON to be passsed into choicesDict["geometry"]
//e.g. 'geometry': ...
featureGeom = Geometry(feature)&lt;/LI-CODE&gt;</description>
    <pubDate>Sat, 29 May 2021 19:21:43 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2021-05-29T19:21:43Z</dc:date>
    <item>
      <title>Arcade - split comma separated attributs in dictionary and show in maps</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061803#M4580</link>
      <description>&lt;P&gt;&lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;Hi&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;everyone&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;I'm&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;trying&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;some&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;advanced&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;arcade&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;expressions&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="correction ac"&gt;dashboard&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;and&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;I&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;need&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;some&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;help&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;My&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;data&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;come&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;from&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;select&lt;/SPAN&gt;_&lt;SPAN class="word menu-enabled"&gt;mutiple&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;field&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;create&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;survey&lt;/SPAN&gt; 123.&lt;/SPAN&gt; &lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;My&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;attributes&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;are&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;comma&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;separated&lt;/SPAN&gt; (&lt;SPAN class="word menu-enabled"&gt;ex&lt;/SPAN&gt;: &lt;SPAN class="word menu-enabled"&gt;Boucherie&lt;/SPAN&gt;&lt;SPAN class="correction ac"&gt;, &lt;/SPAN&gt;&lt;SPAN class="word menu-enabled"&gt;Garage&lt;/SPAN&gt;&lt;SPAN class="correction ac"&gt;, &lt;/SPAN&gt;&lt;SPAN class="word menu-enabled"&gt;Friperie&lt;/SPAN&gt;) &lt;SPAN class="word menu-enabled"&gt;linked&lt;/SPAN&gt; &lt;SPAN class="correction ac"&gt;to&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;a&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;point&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;geometry&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;element&lt;/SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;With&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;this&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;expression&lt;/SPAN&gt;, &lt;SPAN class="word menu-enabled"&gt;I'm&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;able&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;to&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;split&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;and&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;store&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;the&lt;/SPAN&gt; &lt;SPAN class="correction sac"&gt;attribute&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;a&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;dictionary&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;_________&lt;/P&gt;&lt;P&gt;// Reference layer using the FeatureSetByPortalItem() function.&lt;BR /&gt;var fs = FeatureSetByPortalItem(Portal('&lt;A href="https://www.arcgis.com" target="_blank" rel="noopener"&gt;https://www.arcgis.com&lt;/A&gt;'), '371113694bd24607b2e9d01e49024944' , 0, ['TypeLocatLabel'], false);&lt;/P&gt;&lt;P&gt;// Empty dictionary to capture each hazard reported as separate rows.&lt;BR /&gt;var choicesDict = {'fields': [{ 'name': 'split_choices', 'type': 'esriFieldTypeString'}],&lt;BR /&gt;'geometryType': '', 'features': []};&lt;/P&gt;&lt;P&gt;var index = 0;&lt;/P&gt;&lt;P&gt;// Split comma separated hazard types and store in dictionary.&lt;BR /&gt;for (var feature in fs) {&lt;BR /&gt;var split_array = Split(feature["TypeLocatLabel"], ',')&lt;BR /&gt;var count_arr = Count(split_array)&lt;BR /&gt;for(var i = 0; i &amp;lt; count_arr; i++ ){&lt;BR /&gt;choicesDict.features[index++] = {&lt;BR /&gt;'attributes': { 'split_choices': Trim(split_array[i]),&lt;BR /&gt;}}&lt;BR /&gt;}}&lt;/P&gt;&lt;P&gt;// Convert dictionary to featureSet.&lt;BR /&gt;var fs_dict = FeatureSet(Text(choicesDict));&lt;/P&gt;&lt;P&gt;// Return featureset after grouping by hazard types.&lt;BR /&gt;return GroupBy(fs_dict, ['split_choices'],&lt;BR /&gt;[{ name: 'split_count', expression: 'split_choices', statistic: 'COUNT' }]);&lt;/P&gt;&lt;P&gt;______&lt;/P&gt;&lt;DIV class="text_box"&gt;&lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;I&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;use&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;this&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;expression&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;a&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;category&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;selector&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;and&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;this&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;works&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;fine&lt;/SPAN&gt;.&lt;/SPAN&gt; &lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;But&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;the&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;end&lt;/SPAN&gt;, &lt;SPAN class="correction ac"&gt;when&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;I&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;select&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;a&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;category&lt;/SPAN&gt;, &lt;SPAN class="word menu-enabled"&gt;the&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;geometry&lt;/SPAN&gt; &lt;SPAN class="correction ac"&gt;don't&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;show&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;the&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;map&lt;/SPAN&gt;.&lt;/SPAN&gt; &lt;SPAN class="sentence corrected"&gt;(&lt;SPAN class="word menu-enabled"&gt;Ex&lt;/SPAN&gt;: &lt;SPAN class="word menu-enabled"&gt;If&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;I&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;choose&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;Boucherie&lt;/SPAN&gt;, &lt;SPAN class="word menu-enabled"&gt;I&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;want&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;all&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;the&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;points&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;this&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;category&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;to&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;show&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;in&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;the&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;map&lt;/SPAN&gt;).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;Anyone&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;know&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;what&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;I'm&lt;/SPAN&gt; &lt;SPAN class="correction ac"&gt;forgetting&lt;/SPAN&gt;?&lt;/SPAN&gt; &lt;SPAN class="sentence corrected"&gt;&lt;SPAN class="word menu-enabled"&gt;Can&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;someone&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;have&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;one&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;idea&lt;/SPAN&gt; h&lt;SPAN class="word menu-enabled"&gt;ow&lt;/SPAN&gt; &lt;SPAN class="correction ac"&gt;improve&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;my&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;arcade&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;expression&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;to&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;do&lt;/SPAN&gt; &lt;SPAN class="word menu-enabled"&gt;that&lt;/SPAN&gt;?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 14:37:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061803#M4580</guid>
      <dc:creator>SimoneMoretti_MRC</dc:creator>
      <dc:date>2021-05-26T14:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - split comma separated attributs in dictionary and show in maps</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061812#M4582</link>
      <description>&lt;P&gt;I think that part of the problem here is that using &lt;STRONG&gt;Group By&lt;/STRONG&gt; does not return any geometry that you can work with. Can you just use the &lt;STRONG&gt;Grouped Features&lt;/STRONG&gt; type for your category selector, and omit the grouping function in your expression?&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 14:54:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061812#M4582</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-05-26T14:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - split comma separated attributs in dictionary and show in maps</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061815#M4583</link>
      <description>&lt;P&gt;I would say there's a few parts to this, you've supplied False to the return geometry parameter of FeatureSetByPortalItem, I haven't needed to do this myself but I can only guess you also have to request the geometry column in the fields parameter of this also.&lt;/P&gt;&lt;P&gt;This geometry then needs to be formed into the JSON dictionary/string as part of "geometry" :&amp;nbsp;&lt;/P&gt;&lt;P&gt;Note this is just my opinion of how it should work rather than from direct experience.&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 15:01:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061815#M4583</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-05-26T15:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - split comma separated attributs in dictionary and show in maps</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061986#M4590</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for your answer jcarlson.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, if I just use Grouped &lt;SPAN class="s-bl"&gt;Features &lt;/SPAN&gt;&lt;SPAN class="s-bl"&gt;I&lt;/SPAN&gt;'m not able to read the data &lt;SPAN class="s-rg"&gt;correctely&lt;/SPAN&gt;.&lt;BR /&gt;I'm trying to find a way to return the geometry in the Group By function&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 19:44:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061986#M4590</guid>
      <dc:creator>SimoneMoretti_MRC</dc:creator>
      <dc:date>2021-05-26T19:44:01Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - split comma separated attributs in dictionary and show in maps</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061990#M4591</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks for your answer DavidPike,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Do you know what is the function to request the geometry in this case?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 19:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1061990#M4591</guid>
      <dc:creator>SimoneMoretti_MRC</dc:creator>
      <dc:date>2021-05-26T19:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade - split comma separated attributs in dictionary and show in maps</title>
      <link>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1063130#M4607</link>
      <description>&lt;P&gt;I would guess it can be done with something like&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;for (var feature in fs) {
...
//JSON to be passsed into choicesDict["geometry"]
//e.g. 'geometry': ...
featureGeom = Geometry(feature)&lt;/LI-CODE&gt;</description>
      <pubDate>Sat, 29 May 2021 19:21:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-dashboards-questions/arcade-split-comma-separated-attributs-in/m-p/1063130#M4607</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-05-29T19:21:43Z</dc:date>
    </item>
  </channel>
</rss>

