Hello. I have an fc that has been joined to a table. I am trying to use a search cursor and an insert cursor to identify where the rows differ and when they differ, insert them into a blank fc.
For instance, here I am trying to identify where one field has values as null, insert them into the blank fc. I keep getting the following error, and cannot figure out what is going on, as there is a GlobalID field, and I am not even using it here. Appreciate the help!
#begin inserting features into the blank feature classes
searchfields = ["xy", "NIDID_1" , "xy"]
with arcpy.da.SearchCursor(NIDs_Joined,searchfields) as cursor:
for row in cursor:
#If the NIDIDs do not align, then this is a new point. Add it to the to_append fc
if row[1] is None:
curN.insertRow(row)
#if the NIDIDs do match but the xy locations are different, add it to the change_loc fc
if row[0] != row[2]:
curL.insertRow(row)
Traceback (most recent call last):
File "<string>", line 7, in <module>
RuntimeError: Cannot find field 'GlobalID'