<?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: how to create a correlative, based on a start number (script field calculator) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288276#M22308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/253430"&gt;replace accented characters with the field calculator&lt;/A&gt;&amp;nbsp; not closed, you should close old threads if they were answered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting"&gt;/blogs/dan_patterson/2016/08/14/script-formatting&lt;/A&gt;&amp;nbsp; for code formatting so that line numbers can be referenced&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What result did you get?&amp;nbsp; You only posted what you got.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 May 2020 23:43:19 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2020-05-18T23:43:19Z</dc:date>
    <item>
      <title>how to create a correlative, based on a start number (script field calculator)</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288275#M22307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;I try to create a script, which generates a correlative number (ID)&lt;BR /&gt;the start number can vary,&lt;BR /&gt;will not start from 1 or 0&lt;BR /&gt;it can be any number start &amp;nbsp;and the number of rows can also change&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;done this example but it didn't work&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;rec=0&lt;BR /&gt;def autoIncrement():&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; global rec&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pStart = 11 #adjust start value, if req'd &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pInterval =&amp;nbsp;5 #adjust interval value, if req'd&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (rec == 0): &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rec = pStart &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else: &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rec = rec + pInterval &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return rec&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;expression&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;BR /&gt;autoIncrement(ID)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;expected result------------&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;ID&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;11&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;12&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;13&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;14&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;15&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;(sorry my bad English)Thank &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN lang="en"&gt;&lt;SPAN title=""&gt;&lt;SPAN title=""&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2020 22:55:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288275#M22307</guid>
      <dc:creator>RTMRTM</dc:creator>
      <dc:date>2020-05-18T22:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a correlative, based on a start number (script field calculator)</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288276#M22308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/253430"&gt;replace accented characters with the field calculator&lt;/A&gt;&amp;nbsp; not closed, you should close old threads if they were answered&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/blogs/dan_patterson/2016/08/14/script-formatting"&gt;/blogs/dan_patterson/2016/08/14/script-formatting&lt;/A&gt;&amp;nbsp; for code formatting so that line numbers can be referenced&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What result did you get?&amp;nbsp; You only posted what you got.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 May 2020 23:43:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288276#M22308</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-18T23:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a correlative, based on a start number (script field calculator)</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288277#M22309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're passing 'ID' into '&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;def autoIncrement():&lt;/SPAN&gt;' - which has no input parameters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="en" style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;" title=""&gt;expression&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN lang="en" style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; color: #3d3d3d; font-family: inherit; font-size: 100%; font-style: inherit; font-variant: normal; font-weight: inherit; letter-spacing: normal; orphans: 2; outline-color: invert; outline-style: none; outline-width: 0px; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; vertical-align: baseline; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px; padding: 0px; margin: 0px; border: 0px none currentColor;"&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;" title=""&gt;&lt;SPAN style="border-image-outset: 0; border-image-repeat: stretch; border-image-slice: 100%; border-image-source: none; border-image-width: 1; font-family: inherit; font-size: 100%; font-style: inherit; font-weight: inherit; outline-color: invert; outline-style: none; outline-width: 0px; vertical-align: baseline; padding: 0px; margin: 0px; border: 0px none currentColor;" title=""&gt;&lt;BR style="outline-color: invert; outline-style: none; outline-width: 0px;" /&gt;autoIncrement()&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 07:37:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288277#M22309</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-05-19T07:37:30Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a correlative, based on a start number (script field calculator)</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288278#M22310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use the field calculator rather than running the script... or copy and edit it exactly&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/492759_sequential_number.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 08:57:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288278#M22310</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-19T08:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to create a correlative, based on a start number (script field calculator)</title>
      <link>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288279#M22311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-database-sequence.htm" title="https://pro.arcgis.com/en/pro-app/tool-reference/data-management/create-database-sequence.htm"&gt;Create Database Sequence—Data Management toolbox | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 14:17:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-create-a-correlative-based-on-a-start/m-p/288279#M22311</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-19T14:17:45Z</dc:date>
    </item>
  </channel>
</rss>

