<?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: Replacing Multiple Fields using Python in Field Calculator in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/replacing-multiple-fields-using-python-in-field/m-p/1319378#M72169</link>
    <description>&lt;P&gt;Select the unwanted rows with Select Layer By Attribute or with a definition query&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1692222211782.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78272iC6C803B8FD84C7F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_0-1692222211782.png" alt="JohannesLindner_0-1692222211782.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use this with Calculate Field (This changes the data, make a backup!)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# ID =
next_sas_02_sequence()

# Code Block
sas_counter = 5700

def next_sas_02_sequence():
    global sas_counter
    sas_02_sequence = f"SAS-02-{sas_counter:05}"
    sas_counter += 1
    return sas_02_sequence&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1692222346059.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78273i652E4814C26241B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_1-1692222346059.png" alt="JohannesLindner_1-1692222346059.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 16 Aug 2023 21:46:10 GMT</pubDate>
    <dc:creator>JohannesLindner</dc:creator>
    <dc:date>2023-08-16T21:46:10Z</dc:date>
    <item>
      <title>Replacing Multiple Fields using Python in Field Calculator</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/replacing-multiple-fields-using-python-in-field/m-p/1319364#M72167</link>
      <description>&lt;P&gt;I am attempting to take multiple field attributes with a specific classification/moniker (in this case-- any attribute field containing a value with SAS-06-xxxxx), and replace them with classification more in line with the rest of the attributes (Ascending sequential values up from SAS-02-05700 as a starting point).&amp;nbsp; What would the python syntax look like in the code block using Field Calculator.&amp;nbsp; Novice with Python, so any help/feedback is appreciated.&amp;nbsp; Thx.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ESRI Community Field Calc Syntax.jpg" style="width: 438px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78268iE8DE5108C1B2393C/image-dimensions/438x760?v=v2" width="438" height="760" role="button" title="ESRI Community Field Calc Syntax.jpg" alt="ESRI Community Field Calc Syntax.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 21:29:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/replacing-multiple-fields-using-python-in-field/m-p/1319364#M72167</guid>
      <dc:creator>MatthewElbert1</dc:creator>
      <dc:date>2023-08-16T21:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Multiple Fields using Python in Field Calculator</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/replacing-multiple-fields-using-python-in-field/m-p/1319378#M72169</link>
      <description>&lt;P&gt;Select the unwanted rows with Select Layer By Attribute or with a definition query&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_0-1692222211782.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78272iC6C803B8FD84C7F4/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_0-1692222211782.png" alt="JohannesLindner_0-1692222211782.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use this with Calculate Field (This changes the data, make a backup!)&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# ID =
next_sas_02_sequence()

# Code Block
sas_counter = 5700

def next_sas_02_sequence():
    global sas_counter
    sas_02_sequence = f"SAS-02-{sas_counter:05}"
    sas_counter += 1
    return sas_02_sequence&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohannesLindner_1-1692222346059.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78273i652E4814C26241B7/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohannesLindner_1-1692222346059.png" alt="JohannesLindner_1-1692222346059.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Aug 2023 21:46:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/replacing-multiple-fields-using-python-in-field/m-p/1319378#M72169</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-08-16T21:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing Multiple Fields using Python in Field Calculator</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/replacing-multiple-fields-using-python-in-field/m-p/1319606#M72187</link>
      <description>&lt;P&gt;Thanks Johannes, this was very easy to follow and navigate.&amp;nbsp; I tested on a dummy set first, and it worked!&amp;nbsp; Much appreciated with the feedback and screenshots. You just reinforced my belief I need to brush up/build on my Python skills. Cheers!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2023 14:34:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/replacing-multiple-fields-using-python-in-field/m-p/1319606#M72187</guid>
      <dc:creator>MatthewElbert1</dc:creator>
      <dc:date>2023-08-17T14:34:38Z</dc:date>
    </item>
  </channel>
</rss>

