<?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: Use Field Calculator to Generate Alphanumeric Values in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/use-field-calculator-to-generate-alphanumeric/m-p/1546136#M73000</link>
    <description>&lt;P&gt;Thanks Jake, this works perfect!&amp;nbsp; I had to run this script in the ArcMap Python window instead of field calculator which isn't a big deal, but it found the most recent field entry and added on sequentially from there.&amp;nbsp; Thanks again!&lt;/P&gt;</description>
    <pubDate>Mon, 07 Oct 2024 13:48:09 GMT</pubDate>
    <dc:creator>ChrisCyphers</dc:creator>
    <dc:date>2024-10-07T13:48:09Z</dc:date>
    <item>
      <title>Use Field Calculator to Generate Alphanumeric Values</title>
      <link>https://community.esri.com/t5/python-questions/use-field-calculator-to-generate-alphanumeric/m-p/1544916#M72977</link>
      <description>&lt;P&gt;I am using ArcMap 10.6 and have a text field called WAMID.&amp;nbsp; The field values are alphanumeric and sequential. As new features are added this field&amp;nbsp;is null.&amp;nbsp; I would like help writing a python script where once a week or so I can use field calculator to calculate sequential values for this field.&amp;nbsp; The most recent value for this field is&amp;nbsp;WMN06022087 so the script should fill in this field with&amp;nbsp;WMN06022088,&amp;nbsp;WMN06022089,&amp;nbsp;WMN06022090,&amp;nbsp;WMN06022091, etc.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 18:54:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-field-calculator-to-generate-alphanumeric/m-p/1544916#M72977</guid>
      <dc:creator>ChrisCyphers</dc:creator>
      <dc:date>2024-10-02T18:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Use Field Calculator to Generate Alphanumeric Values</title>
      <link>https://community.esri.com/t5/python-questions/use-field-calculator-to-generate-alphanumeric/m-p/1545160#M72984</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/129601"&gt;@ChrisCyphers&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Below is an example on how you could do this:&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;import arcpy

# Variable
table = r'c:\TEMP\PYTHON\Test.gdb\addresses'

# Get Max Val
print("Get Max Val")
vals = [row[0].split("WMN0")[-1] for row in arcpy.da.SearchCursor(table, ["WAMID"], "WAMID IS NOT NULL")]
maxVal = int(max(vals))

# Update field
print("Update field")
with arcpy.da.UpdateCursor(table, ["WAMID"], "WAMID IS NULL") as cursor:
    for row in cursor:
        newVal = maxVal + 1
        row[0] = "WMN0" + str(newVal)
        cursor.updateRow(row)
        maxVal = newVal
del cursor

print("Finished")&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 03 Oct 2024 13:09:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-field-calculator-to-generate-alphanumeric/m-p/1545160#M72984</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-10-03T13:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: Use Field Calculator to Generate Alphanumeric Values</title>
      <link>https://community.esri.com/t5/python-questions/use-field-calculator-to-generate-alphanumeric/m-p/1546136#M73000</link>
      <description>&lt;P&gt;Thanks Jake, this works perfect!&amp;nbsp; I had to run this script in the ArcMap Python window instead of field calculator which isn't a big deal, but it found the most recent field entry and added on sequentially from there.&amp;nbsp; Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2024 13:48:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/use-field-calculator-to-generate-alphanumeric/m-p/1546136#M73000</guid>
      <dc:creator>ChrisCyphers</dc:creator>
      <dc:date>2024-10-07T13:48:09Z</dc:date>
    </item>
  </channel>
</rss>

