<?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: Calculate Unique ID's based on table sort in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346172#M15251</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually... it is the "new Dan".&amp;nbsp; My old account got "retired and frozen" and I had to open a new one.&amp;nbsp; At level 5 now &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;, only 140,000 to go till I am back where I was&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 May 2020 16:49:05 GMT</pubDate>
    <dc:creator>DanPatterson</dc:creator>
    <dc:date>2020-05-21T16:49:05Z</dc:date>
    <item>
      <title>Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346164#M15243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All.. So here is what I'm trying to do.&amp;nbsp; I know how to calculate Unique ID's.&amp;nbsp; What I'm trying to do is calculate them based the the sort of the table.&amp;nbsp; My data was randomly selected and on this field the table has been sorted.&amp;nbsp; I want to then calculate the Unique ID's based on this sort.&amp;nbsp; So my first record will get a 1 and so on.&amp;nbsp; What currently happens is the unique ID is created based on the object ID or FID not sure which causing my sort on my field to be invalid.&amp;nbsp; Is there a way to force the Unique ID to calculate based on the table sort?&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Jeremy&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 15:04:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346164#M15243</guid>
      <dc:creator>JeremyJones1</dc:creator>
      <dc:date>2020-05-19T15:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346165#M15244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See if this approach works for you. In the example below, I use the arcpy.da.UpdateCursor with a sql clause to ORDER By (sort) by&amp;nbsp;PARCEL which is a text field:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
fc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'C:\Temp\Junk.gdb\points'&lt;/SPAN&gt;
id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;UpdateCursor&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;fc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'SortID'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sql_clause&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'ORDER BY PARCEL'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; row &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; cursor&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        id&lt;SPAN class="operator token"&gt;+=&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;
        row&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; id
        cursor&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateRow&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;row&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Here is a screen capture of my results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/492815_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:18:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346165#M15244</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2021-12-11T16:18:24Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346166#M15245</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;rank fields in&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/docs/DOC-14928-free-tools-for-arcgis-pro-table-tools"&gt;https://community.esri.com/docs/DOC-14928-free-tools-for-arcgis-pro-table-tools&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 May 2020 01:10:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346166#M15245</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-20T01:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346167#M15246</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan I was able to use your tools and do what I needed to do.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:17:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346167#M15246</guid>
      <dc:creator>JeremyJones1</dc:creator>
      <dc:date>2020-05-21T16:17:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346168#M15247</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Joe!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:17:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346168#M15247</guid>
      <dc:creator>JeremyJones1</dc:creator>
      <dc:date>2020-05-21T16:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346169#M15248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just out of courtesy, how about you mark Dan's reply as the answer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:18:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346169#M15248</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-21T16:18:51Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346170#M15249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Because I actually used his.&amp;nbsp; I Yours most likely works as well I just don't have experience with coding and modifying it.&amp;nbsp; If I could mark them both as correct I would have.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:22:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346170#M15249</guid>
      <dc:creator>JeremyJones1</dc:creator>
      <dc:date>2020-05-21T16:22:35Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346171#M15250</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's cool!&amp;nbsp;&lt;A href="https://community.esri.com/migrated-users/3116"&gt;Dan Patterson&lt;/A&gt;&amp;nbsp;needs the MVP points more than I do...&amp;nbsp; &amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:26:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346171#M15250</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-21T16:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346172#M15251</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually... it is the "new Dan".&amp;nbsp; My old account got "retired and frozen" and I had to open a new one.&amp;nbsp; At level 5 now &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/wink.png" /&gt;, only 140,000 to go till I am back where I was&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:49:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346172#M15251</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-21T16:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346173#M15252</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are telling me I have more points than you now!&amp;nbsp; That just made my day!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:52:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346173#M15252</guid>
      <dc:creator>JoeBorgione</dc:creator>
      <dc:date>2020-05-21T16:52:38Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Unique ID's based on table sort</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346174#M15253</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 j-img-original" src="https://community.esri.com/legacyfs/online/493011_turtlehare.jpg" /&gt;&lt;/P&gt;&lt;P&gt;game on&amp;nbsp;&lt;SPAN style="color: #000000;"&gt;&lt;IMG class="jive_emoji" src="https://community.esri.com/images/emojis/1f602.png" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 May 2020 16:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/calculate-unique-id-s-based-on-table-sort/m-p/346174#M15253</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2020-05-21T16:59:23Z</dc:date>
    </item>
  </channel>
</rss>

