I am trying to update the points selected features field "Verifi2" with "Match" or "No" based on if the 'SiteAddres' field of the selected feature matches the parcels layer 'SiteAddress' field. I currently have the following code but all of the selected features have "No" in the Verifi2 field. Which is not the case because some of the selected point features SiteAddres does match parcels SiteAddress. I would appreciate some help please.
from datetime import datetime as d
startTime = d.now()
fc1 = "AddresPointsTest"
fc2 = "TaxParcels1"
#set up cursors
cursor1 = arcpy.da.SearchCursor(fc1, ["SiteAddres", "Verifi2"])
cursor2 = arcpy.da.SearchCursor(fc2, ["SiteAddress"])
with arcpy.da.UpdateCursor(fc1, ["SiteAddres", "Verifi2"]) as cursor1:
for row1 in cursor1:
with arcpy.da.SearchCursor(fc2, ["SiteAddress"]) as cursor2:
row2 = cursor2.next()
row1 = "Match" if row1.lower() == row2.lower() else "No"
print '(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')'
except Exception, e:
# If an error occurred, print line number and error message
import traceback, sys
tb = sys.exc_info()
print "Line %i" % tb.tb_lineno