<?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 Can I Find The Missing Sequence Number in a Field in ArcGIS in ArcMap Questions</title>
    <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327051#M4564</link>
    <description>&lt;P&gt;what should I change in your&amp;nbsp;&lt;SPAN&gt;Python script to work , I&amp;nbsp;create&amp;nbsp;field test to run your&amp;nbsp;Python script but it does not work ,&amp;nbsp; I&amp;nbsp;want to know the missing number in field parcel ….I need more details!!!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 09 Sep 2023 05:37:57 GMT</pubDate>
    <dc:creator>MAMDOUHZALAKY</dc:creator>
    <dc:date>2023-09-09T05:37:57Z</dc:date>
    <item>
      <title>How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1326692#M4554</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How Can I Find The Missing Sequence Number in a Field in ArcGIS I have thousand numbers on that field&amp;nbsp;? I have ArcGIS&amp;nbsp;10.8&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NUMBER.JPG" style="width: 364px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80179iC350F3EB058D2F05/image-size/large?v=v2&amp;amp;px=999" role="button" title="NUMBER.JPG" alt="NUMBER.JPG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Sep 2023 07:20:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1326692#M4554</guid>
      <dc:creator>MAMDOUHZALAKY</dc:creator>
      <dc:date>2023-09-08T07:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1326708#M4556</link>
      <description>&lt;P&gt;You can do it with a little Python script:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;fc = "TestPolygons"  # path the the feature class or name of the layer
field = "IntegerField1"

# get a set of values in the field
values = {row[0] for row in arcpy.da.SearchCursor(fc, [field])}
# get a set of the complete range
complete_values = set(range(min(values), max(values)))
# the difference between these sets are the missing numbers
missing_values = complete_values - values
print(sorted(missing_values))&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 08 Sep 2023 09:30:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1326708#M4556</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-09-08T09:30:16Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327051#M4564</link>
      <description>&lt;P&gt;what should I change in your&amp;nbsp;&lt;SPAN&gt;Python script to work , I&amp;nbsp;create&amp;nbsp;field test to run your&amp;nbsp;Python script but it does not work ,&amp;nbsp; I&amp;nbsp;want to know the missing number in field parcel ….I need more details!!!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 05:37:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327051#M4564</guid>
      <dc:creator>MAMDOUHZALAKY</dc:creator>
      <dc:date>2023-09-09T05:37:57Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327054#M4565</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture_paython.JPG" style="width: 803px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80266i84DB6844AF9D54C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture_paython.JPG" alt="Capture_paython.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 05:30:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327054#M4565</guid>
      <dc:creator>MAMDOUHZALAKY</dc:creator>
      <dc:date>2023-09-09T05:30:53Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327057#M4566</link>
      <description>&lt;P&gt;The script is meant to be run in the Python Window, not in the Fieled Calculator.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Open the &lt;A href="https://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/what-is-the-python-window-.htm" target="_blank" rel="noopener"&gt;ArcMap Python Window&lt;/A&gt;&lt;/LI&gt;&lt;LI&gt;Copy/Paste the script into the window&lt;/LI&gt;&lt;LI&gt;Change the first two lines&lt;/LI&gt;&lt;LI&gt;Execute by pressing Enter (may have to press it twice)&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Sat, 09 Sep 2023 06:25:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327057#M4566</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-09-09T06:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327078#M4571</link>
      <description>&lt;P&gt;Ok now its work …. but can we make another change in the python script to let him give us the missing number in group A and the missing number in group B , because the missing number in group A is different than the missing number in group B.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GROUP NUMBER.JPG" style="width: 177px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/80267i82CFF5108797F3A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="GROUP NUMBER.JPG" alt="GROUP NUMBER.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Sep 2023 15:38:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327078#M4571</guid>
      <dc:creator>MAMDOUHZALAKY</dc:creator>
      <dc:date>2023-09-09T15:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327157#M4575</link>
      <description>&lt;LI-CODE lang="python"&gt;fc = "TestPolygons"  # path the the feature class or name of the layer
field = "IntegerField1"
group_field = "TextField1"

# read the fc
data = [row for row in arcpy.da.SearchCursor(fc, [group_field, field])]

# iterate over the groups
groups = {d[0] for d in data}
for g in sorted(groups):
    # get the values in that group
    values = {d[1] for d in data if d[0] == g}
    # get a set of the complete range
    complete_values = set(range(min(values), max(values)))
    # the difference between these sets are the missing numbers
    missing_values = complete_values - values
    print("Missing values in group {}: {}".format(g, sorted(missing_values)))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 11 Sep 2023 07:29:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327157#M4575</guid>
      <dc:creator>JohannesLindner</dc:creator>
      <dc:date>2023-09-11T07:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327307#M4578</link>
      <description>&lt;P&gt;Thank You Very Much For Your Great Solution&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2023 14:55:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1327307#M4578</guid>
      <dc:creator>MAMDOUHZALAKY</dc:creator>
      <dc:date>2023-09-11T14:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1549234#M4974</link>
      <description>&lt;P&gt;Hello i am receiving this error message when trying to run.&lt;/P&gt;&lt;P&gt;fc = r"path"&lt;BR /&gt;field = "FXSA_ID"&lt;/P&gt;&lt;P&gt;# get a set of values in the field&lt;BR /&gt;values = {row[0] for row in arcpy.da.SearchCursor(fc, [field])}&lt;BR /&gt;# get a set of the complete range&lt;BR /&gt;complete_values = set(range(min(values), max(values)))&lt;BR /&gt;# the difference between these sets are the missing numbers&lt;BR /&gt;missing_values = complete_values - values&lt;BR /&gt;print(sorted(missing_values))&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;Traceback (most recent call last):&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;File "&amp;lt;string&amp;gt;", line 7, in &amp;lt;module&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;TypeError: '&amp;lt;' not supported between instances of 'NoneType' and 'int'&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 19:57:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1549234#M4974</guid>
      <dc:creator>Krocha</dc:creator>
      <dc:date>2024-10-16T19:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Find The Missing Sequence Number in a Field in ArcGIS</title>
      <link>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1549239#M4975</link>
      <description>&lt;P&gt;Never mind i got it. I had some fields that did not have a number they were NULL. Had to remove those. Not sure if there is a way to ignore them.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Oct 2024 20:44:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcmap-questions/how-can-i-find-the-missing-sequence-number-in-a/m-p/1549239#M4975</guid>
      <dc:creator>Krocha</dc:creator>
      <dc:date>2024-10-25T20:44:53Z</dc:date>
    </item>
  </channel>
</rss>

