<?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 Calculations in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560133#M31726</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;Thanks for the response. I am still learning python. so the script should look like this for my data?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="475" src="https://community.esri.com/legacyfs/online/484486_pastedImage_1.png" width="253" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/484580_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2020 16:05:19 GMT</pubDate>
    <dc:creator>JamesBushOpelika</dc:creator>
    <dc:date>2020-03-09T16:05:19Z</dc:date>
    <item>
      <title>Field Calculations</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560131#M31724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can anyone help me with a field calculation script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field for sewer lines that has a unique code that increases by one for every new line added we typically have dozens of line segments added at a time. I would like to automate this field entry.&amp;nbsp;&lt;/P&gt;&lt;P&gt;last existing field ex 'SSP1000' New feature field would become 'SSP1001"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am green with python, thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Mar 2020 21:49:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560131#M31724</guid>
      <dc:creator>JamesBushOpelika</dc:creator>
      <dc:date>2020-03-04T21:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculations</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560132#M31725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image" height="312" src="https://community.esri.com/legacyfs/online/484066_sequential_calc.png" width="631" /&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;last &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;  &lt;SPAN class="comment token"&gt;# ---- change me&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;def&lt;/SPAN&gt; &lt;SPAN class="token function"&gt;seq_cal&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="string token"&gt;"""change last = 1 line to show last """&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;global&lt;/SPAN&gt; last
    a &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; last &lt;SPAN class="operator token"&gt;==&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        last &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; a
    &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        last &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; last &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; a
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SSP{:&amp;gt;04}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;last&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;python parser&lt;/P&gt;&lt;P&gt;you need a code block&lt;/P&gt;&lt;P&gt;emulate the above&lt;/P&gt;&lt;P&gt;highlight the rows you want to calculate&lt;/P&gt;&lt;P&gt;change the last = .... line to enter your previous value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:10:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560132#M31725</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T00:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculations</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560133#M31726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan,&lt;/P&gt;&lt;P&gt;Thanks for the response. I am still learning python. so the script should look like this for my data?&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" height="475" src="https://community.esri.com/legacyfs/online/484486_pastedImage_1.png" width="253" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/484580_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:05:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560133#M31726</guid>
      <dc:creator>JamesBushOpelika</dc:creator>
      <dc:date>2020-03-09T16:05:19Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculations</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560134#M31727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have verified it. It works like a charm! You the Man!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:17:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560134#M31727</guid>
      <dc:creator>JamesBushOpelika</dc:creator>
      <dc:date>2020-03-09T16:17:41Z</dc:date>
    </item>
    <item>
      <title>Re: Field Calculations</title>
      <link>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560135#M31728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad it worked out James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2020 16:18:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/field-calculations/m-p/560135#M31728</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2020-03-09T16:18:42Z</dc:date>
    </item>
  </channel>
</rss>

