<?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: 10.1 code that populates a field with sequential numbers in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/10-1-code-that-populates-a-field-with-sequential/m-p/297468#M10299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You just need to make the expression with the parenthesis to execute the function.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;autoIncrement()&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yaaay.....little mistake.....huge difference!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you sooo much &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 18 Sep 2013 22:39:57 GMT</pubDate>
    <dc:creator>ShikoNjuno</dc:creator>
    <dc:date>2013-09-18T22:39:57Z</dc:date>
    <item>
      <title>10.1 code that populates a field with sequential numbers</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/10-1-code-that-populates-a-field-with-sequential/m-p/297466#M10297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi folks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a shapefile whose ID and FID numbers are all messed up in the attribute table and I'm looking for code I can type into my "Field Calculator" window that will fill in unique values for each polygon.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any samples anyone?!!?! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's what I've tried so far:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]27562[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The complete code is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;rec=0&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;def autoIncrement():&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; global rec&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pStart = 1 #adjust start value, if req'd &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; pInterval = 1 #adjust interval value, if req'd&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; if (rec == 0): &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; rec = pStart &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; else: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; rec = rec + pInterval &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; return rec&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone see any issues that might be causing this not to work?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The error msg I keep getting is the dreaded 99999 error. :confused:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 20:43:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/10-1-code-that-populates-a-field-with-sequential/m-p/297466#M10297</guid>
      <dc:creator>ShikoNjuno</dc:creator>
      <dc:date>2013-09-18T20:43:25Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 code that populates a field with sequential numbers</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/10-1-code-that-populates-a-field-with-sequential/m-p/297467#M10298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You just need to make the expression with the parenthesis to execute the function.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;autoIncrement()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 21:52:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/10-1-code-that-populates-a-field-with-sequential/m-p/297467#M10298</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-09-18T21:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 code that populates a field with sequential numbers</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/10-1-code-that-populates-a-field-with-sequential/m-p/297468#M10299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You just need to make the expression with the parenthesis to execute the function.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;autoIncrement()&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Yaaay.....little mistake.....huge difference!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you sooo much &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Sep 2013 22:39:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/10-1-code-that-populates-a-field-with-sequential/m-p/297468#M10299</guid>
      <dc:creator>ShikoNjuno</dc:creator>
      <dc:date>2013-09-18T22:39:57Z</dc:date>
    </item>
  </channel>
</rss>

