<?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 Expression - Calculate Field - Reorganizing data within a field in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401689#M81056</link>
    <description>&lt;P&gt;Thank you!!&lt;/P&gt;</description>
    <pubDate>Wed, 27 Mar 2024 20:36:19 GMT</pubDate>
    <dc:creator>Roose_22</dc:creator>
    <dc:date>2024-03-27T20:36:19Z</dc:date>
    <item>
      <title>Arcade Expression - Calculate Field - Reorganizing data within a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401530#M81031</link>
      <description>&lt;P&gt;I'm creating a grid index for roads. I've created the field (Page:Grid) and it includes the page number and grid number, but they are listed as such:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="esriCommunityMarch24.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99234iC233AC2CDBB64763/image-size/large?v=v2&amp;amp;px=999" role="button" title="esriCommunityMarch24.JPG" alt="esriCommunityMarch24.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'd like the data to display with the page number then all grids on that particular page. So rather than reading 26: C1, 26: C2, 26: C3, 26: C4 it would appear 26: C1, C2, C3, C4. I was thinking calculate field would be the best way to reorganize the field the way I'd like. Is this possible?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 16:02:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401530#M81031</guid>
      <dc:creator>Roose_22</dc:creator>
      <dc:date>2024-03-27T16:02:04Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - Calculate Field - Reorganizing data within a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401558#M81039</link>
      <description>&lt;P&gt;Does the following calculate field script produce the output you'd like? Be sure to enable Edit Undo! You might need to change the &lt;EM&gt;$feature['x']&lt;/EM&gt; names to match your fields.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var pagenum = $feature['Page Number'] + ":"
pagenum + Concatenate(Split($feature['Page:Grid'],pagenum))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 17:05:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401558#M81039</guid>
      <dc:creator>Robert_Houston</dc:creator>
      <dc:date>2024-03-27T17:05:39Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - Calculate Field - Reorganizing data within a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401625#M81050</link>
      <description>&lt;P&gt;This should give you the correct output&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var arrField = Split($feature['Page:Grid'],",");
var dict = {}
for (var i in arrField) {
  var input = Split(arrField[i], ": ");
  var key = input[0];
  if (HasKey(dict, key)) {
    var value = Concatenate([dict[key], input[1]], ", ")
    dict[key] = value;
  } else {
    dict[key] = input[1]
  }
}
var output = [];
for (var k in dict) {
  Push(output, Concatenate([k, dict[k]], ': '))
}
return Concatenate(output, ' | ')&lt;/LI-CODE&gt;&lt;P&gt;For example, this would return "20: E5 | 21: A5 | 22: A1 | 26: D1, E1" for row 8&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 19:04:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401625#M81050</guid>
      <dc:creator>KenBuja</dc:creator>
      <dc:date>2024-03-27T19:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - Calculate Field - Reorganizing data within a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401674#M81054</link>
      <description>&lt;P&gt;Thanks, Robert! It did for some records, but not all for some reason.&amp;nbsp; I'm not sure if the attached image is ledgable or not. The field showing&amp;nbsp;39: A3,39: A4,39: A5,39: B2,39: B3,39: C2,38: E4,38: E5,42: B1,42: C1 produced results of&amp;nbsp;39: A3, A4, A5, B2, B3, C2,38: E4,38: E5,42: B1,42: C1 with the provided script. I created a new field named Index for the calculate field results to populate.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="esriCommunityMarch24_2.JPG" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/99257iEDDEC20F3EE3BCC1/image-size/large?v=v2&amp;amp;px=999" role="button" title="esriCommunityMarch24_2.JPG" alt="esriCommunityMarch24_2.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 20:21:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401674#M81054</guid>
      <dc:creator>Roose_22</dc:creator>
      <dc:date>2024-03-27T20:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: Arcade Expression - Calculate Field - Reorganizing data within a field</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401689#M81056</link>
      <description>&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Wed, 27 Mar 2024 20:36:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcade-expression-calculate-field-reorganizing/m-p/1401689#M81056</guid>
      <dc:creator>Roose_22</dc:creator>
      <dc:date>2024-03-27T20:36:19Z</dc:date>
    </item>
  </channel>
</rss>

