<?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: field calculator help in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1293097#M4436</link>
    <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1685027615197.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71665i8B39AB64E46E690A/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_0-1685027615197.png" alt="JohannesLindner_0-1685027615197.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But this is for ArcGIS Pro, and I didn't realize that you posted this question in the ArcMap group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're working with ArcMap, it's much easier to do this task with a little Python script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Open your Python Window&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1685028433615.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71672i9237052A12290B87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1685028433615.png" alt="JohannesLindner_1-1685028433615.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paste in this script, edit the first three lines and execute (hit Enter).&lt;/P&gt;&lt;LI-CODE lang="python"&gt;table = "TestPolygons"  # the table path or layer name
text_field = "TextField1"  # the sort field
number_field = "IntegerField1"  # the field that will be calculated

i = 1
with arcpy.da.UpdateCursor(table, [text_field, number_field], sql_clause=[None, "ORDER BY {}".format(text_field)]) as cursor:
    for row in cursor:
        row[1] = i
        cursor.updateRow(row)
        i += 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 25 May 2023 15:27:41 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-05-25T15:27:41Z</dc:date>
    <item>
      <title>field calculator help</title>
      <link>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1292967#M4433</link>
      <description>&lt;PRE&gt;Hello community, I need help working with the attribute table, I need to number all the lines in my case from 1 to 357, but one of the columns with the name of the properties has to be in alphabetical order, how can I do this using the field calculator. &lt;BR /&gt;Thanks in advance for your attention&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 10:27:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1292967#M4433</guid>
      <dc:creator>JoãoToscano</dc:creator>
      <dc:date>2023-05-25T10:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: field calculator help</title>
      <link>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1292978#M4434</link>
      <description>&lt;P&gt;Switch language to Arcade, use this expression (change "TextField1" to the name of your field):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;var oid = $feature.OBJECTID
var txt = $feature.TextField1

var previous = Filter($featureset, "TextField1 &amp;lt; @txt")
var same_lower = Filter($featureset, "TextField1 = @txt AND OBJECTID &amp;lt; @oid")
return Count(previous) + Count(same_lower) + 1&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 25 May 2023 11:26:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1292978#M4434</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-05-25T11:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: field calculator help</title>
      <link>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1293023#M4435</link>
      <description>&lt;PRE&gt;Thanks for the quick reply, I'm relatively new to working with Arqgis, how do I change the Field Calculator language to arcade?&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 13:17:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1293023#M4435</guid>
      <dc:creator>JoãoToscano</dc:creator>
      <dc:date>2023-05-25T13:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: field calculator help</title>
      <link>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1293097#M4436</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1685027615197.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71665i8B39AB64E46E690A/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_0-1685027615197.png" alt="JohannesLindner_0-1685027615197.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But this is for ArcGIS Pro, and I didn't realize that you posted this question in the ArcMap group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're working with ArcMap, it's much easier to do this task with a little Python script.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Open your Python Window&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1685028433615.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/71672i9237052A12290B87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JohannesLindner_1-1685028433615.png" alt="JohannesLindner_1-1685028433615.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Paste in this script, edit the first three lines and execute (hit Enter).&lt;/P&gt;&lt;LI-CODE lang="python"&gt;table = "TestPolygons"  # the table path or layer name
text_field = "TextField1"  # the sort field
number_field = "IntegerField1"  # the field that will be calculated

i = 1
with arcpy.da.UpdateCursor(table, [text_field, number_field], sql_clause=[None, "ORDER BY {}".format(text_field)]) as cursor:
    for row in cursor:
        row[1] = i
        cursor.updateRow(row)
        i += 1&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2023 15:27:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/field-calculator-help/m-p/1293097#M4436</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-05-25T15:27:41Z</dc:date>
    </item>
  </channel>
</rss>

