<?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: Compare field attributes in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637378#M49639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add your field or create a copy and add a field then make your model similar to the one below.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/192826_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 23 Mar 2016 16:51:05 GMT</pubDate>
    <dc:creator>WesMiller</dc:creator>
    <dc:date>2016-03-23T16:51:05Z</dc:date>
    <item>
      <title>Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637369#M49630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a points layer&amp;nbsp; and polygon layer , I need to compare field "SiteAddres" from the points layer to "SiteAddress" to the polygon layer and if it matches i need it to populate field "Verifi" with "Match" or if it doesn't match to populate "Verifi" with "No Match".&amp;nbsp; Although i am not sure what would be the best way to achieve what i am trying to do because i am trying to compare address which will have upper case and lower case and spaces. I would prefer not to do a spatial join every time i need to verify and i looked into doing it with a python script but i am not sure how to do it?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get no error but nothing the field "Verifi" doens't get populated with "Match" or "No Match"&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc1 = "Points"
fc2 = "Polygons"

cursor1 = arcpy.da.SearchCursor(fc1, ["SiteAddres", "Verifi"])
cursor2 = arcpy.da.SearchCursor(fc2, ["SiteAddres"])

for row1 in cursor1:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in cursor2:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row2[0] == row1[0]:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row1 in cursor1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row1[1] = "Match"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row1[1] = "No Match"
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried spatially joining the two layers and using field calculator but i am getting an invalid syntex error on line 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def ifBlock( SiteAddres , [SiteAddr_1 ):
 if SiteAddres = =SiteAddr_1:
&amp;nbsp; return "Match"
 else:
&amp;nbsp; return" No Match"

ifBlock( SiteAddres , SiteAddr_1 )&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:05:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637369#M49630</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T03:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637370#M49631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For your bottom block of code, using an If statement, you need to put the equal signs together&lt;/P&gt;&lt;P&gt;if SiteAddres == SiteAddr_1:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Plus, in the def area, in the bottom block of code, it looks like you have an open bracket without a closed bracket.&lt;/P&gt;&lt;P&gt;And you might need to indent more in the bottom block as well (4 spaces for an indent).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 15:00:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637370#M49631</guid>
      <dc:creator>AdrianWelsh</dc:creator>
      <dc:date>2016-03-23T15:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637371#M49632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;python parser&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN class="keyword"&gt;#code block&lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;def ifBlock( SiteAddres , SiteAddr_1 ):&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if SiteAddres == SiteAddr_1:&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &lt;SPAN class="string"&gt;"Match"&lt;/SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;&lt;/SPAN&gt;&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN class="keyword"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return &lt;SPAN class="string"&gt;"No Match"&lt;/SPAN&gt;&amp;nbsp; &lt;/SPAN&gt;
#expression block
ifBlock( !SiteAddres! , !SiteAddr_1! )&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:05:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637371#M49632</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-12T03:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637372#M49633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To update the data the first cursor needs to be an update cursor and after setting the value for the field you'd want to call the updateRow method to commit it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the example at the bottom of the following page.&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/updatecursor-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-data-access/updatecursor-class.htm"&gt;UpdateCursor—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 15:07:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637372#M49633</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2016-03-23T15:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637373#M49634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could set up a model that does:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Spatial join&lt;/LI&gt;&lt;LI&gt;joins the spatial join with the tables&lt;/LI&gt;&lt;LI&gt;Select the addresses that are &amp;lt;&amp;gt;&lt;/LI&gt;&lt;LI&gt;You could then field calculate verified or field calculate the addresses&lt;/LI&gt;&lt;LI&gt;remove the table join&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;or do your spatial join in model builder and export to python and use the resulting field as an input to the following script. The script prints the oids of the non matching of both feature classes you could easily modify to get what you need&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#Script to compare 2 feature classes
#Author Wes Miller


import arcpy
import numpy as np
import datetime


#Print start time and date 
dt = datetime.datetime.now()
print dt


#The Feature Class to Check
originFC = arcpy.GetParameterAsText(0)
#The feature class with updates needed for feature class above
changeFC = arcpy.GetParameterAsText(1)


origDesc = arcpy.Describe(originFC)
oidName = origDesc.oidFieldName


field_names = arcpy.GetParameterAsText(2)#Example: "Shape","TMS","OWNERNAME","TOTBDGVAL","DISTRICT","ADD1","ADD2","ADD3","MAP","BLOCK","PARCEL","CALCULATED_ACREAGE","ADDR_SITE"


originFCarr = arcpy.da.FeatureClassToNumPyArray(originFC,(field_names),null_value=-9999)
originFCarrID = arcpy.da.FeatureClassToNumPyArray(originFC,(oidName))
changeFCarr = arcpy.da.FeatureClassToNumPyArray(changeFC,(field_names),null_value=-9999)
changeFCarrID = arcpy.da.FeatureClassToNumPyArray(changeFC,(oidName))


print "Arrays Complete"
count = 0
deletesarr = np.where(np.invert(np.in1d(originFCarr,changeFCarr)))
addsarr = np.where(np.invert(np.in1d(changeFCarr,originFCarr)))
adds = []
for each in&amp;nbsp; addsarr[0]:
&amp;nbsp;&amp;nbsp;&amp;nbsp; adds.append(changeFCarrID[each][0])
deletes = []
for each in deletesarr[0]:
&amp;nbsp;&amp;nbsp;&amp;nbsp; deletes.append(originFCarrID[each][0])


#Current Outputs are printed here for testing purposes
print adds
print 
print deletes


ndt = datetime.datetime.now()
print ndt&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:05:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637373#M49634</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-12T03:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637374#M49635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I changed it to the following but i get Error 000539:,&lt;/P&gt;&lt;P&gt;which states...&lt;/P&gt;&lt;P&gt;"This error code covers a number of Python errors:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Example error 1: &lt;EM&gt;exceptions.TypeError: cannot concatenate 'str' and 'int' objects&lt;/EM&gt;.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;The above is a Python-specific error. The calculation is attempting to add or concatenate a string and a number. "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;def ifBlock( SiteAddres , SiteAddr_1 ): 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if SiteAddres == SiteAddr_1 :
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "Match"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return "NoMatch"

ifBlock( SiteAddres , SiteAddr_1)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:05:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637374#M49635</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T03:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637375#M49636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dan.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The after making the following like you suggest it ran" ifBlock( !SiteAddres! , !SiteAddr_1! )".&lt;/P&gt;&lt;P&gt;but all the records returned as "No Match". I just realized that the attributes in SiteAddr_1 are all uppercase and that the SiteAddres are proper case. I had to change the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;if SiteAddres.lower() == SiteAddr_1&lt;SPAN class="keyword"&gt;.lower()&lt;/SPAN&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="keyword"&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 15:37:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637375#M49636</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2016-03-23T15:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637376#M49637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried the following but nothing happens i get no error either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc1 = "Points"
fc2 = "Polygons"

cursor1 = arcpy.da.SearchCursor(fc1, ["SiteAddres", "Verifi"])
cursor2 = arcpy.da.SearchCursor(fc2, ["SiteAddres"])

# Create update cursor for feature class 
with arcpy.da.UpdateCursor(fc1, "Verifi") as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row1 in cursor1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row2 in cursor2:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if row2[0] == row1[0]:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row1 in cursor1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row1[1] = "Match"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row1[1] = "No Match"

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Update the cursor with the updated list
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.updateRow(row)
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:05:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637376#M49637</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T03:05:24Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637377#M49638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I did try making a model with model builder but i did not have any success.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Export Graphic.png" class="image-1 jive-image" src="/legacyfs/online/192877_Export Graphic.png" style="width: 620px; height: 230px;" /&gt;&lt;IMG alt="Image2.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/192878_Image2.png" style="width: 620px; height: 500px;" /&gt;&lt;IMG alt="Image3.png" class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/192879_Image3.png" style="width: 620px; height: 500px;" /&gt;&lt;IMG alt="Image4.png" class="image-4 jive-image" src="https://community.esri.com/legacyfs/online/192880_Image4.png" style="width: 620px; height: 500px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 16:28:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637377#M49638</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2016-03-23T16:28:18Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637378#M49639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Add your field or create a copy and add a field then make your model similar to the one below.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/192826_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 16:51:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637378#M49639</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-03-23T16:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637379#M49640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's a quick python snippet that will:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;loop the points feature class with an update cursor&lt;/LI&gt;&lt;LI&gt;select the polygon it intersects&lt;/LI&gt;&lt;LI&gt;get the first selected polygon&lt;/LI&gt;&lt;LI&gt;check if the SiteAdress fields match when both are lowercased&lt;/LI&gt;&lt;LI&gt;set the point Verifi field&lt;/LI&gt;&lt;LI&gt;update the row&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Definitely a bunch of assumptions in this and no error handling but it should get you going... Arcpy doesn't let us do spatial searches yet&amp;nbsp; so you have to fallback on the "selectbylocation" tool .... it's heavy handed but works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;fc1 = "points"
fc2 = "Polygons"
lyr2 = arcpy.MakeFeatureLayer_management(fc2)
with arcpy.da.UpdateCursor(fc1, ["SHAPE@", "SiteAddress", "Verifi"]) as cursor1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row1 in cursor1:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print row1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.SelectLayerByLocation_management(lyr2, "INTERSECT", row1[0])
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.SearchCursor(lyr2, ["SiteAddress"]) as cursor2:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row2 = cursor2.next()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print row2
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row1[2] = "Match" if row1[1].lower() == row2[0].lower() else "No"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print row1[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor1.updateRow(row1)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:05:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637379#M49640</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2021-12-12T03:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637380#M49641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a little confused on what you mean by add your field, at what point of the model do you want me to add the field into based on your mobel? Also i am confused on the "Add Join" after the spaital join. what is the output of the spatial join suppose to be joining to?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the replay.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 17:57:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637380#M49641</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2016-03-23T17:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637381#M49642</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I get the following.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error &lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 5, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;RuntimeError: The operation was attempted on an empty geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 18:31:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637381#M49642</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2016-03-23T18:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637382#M49643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Never mind i had the wrong layer in arcmap.&lt;/P&gt;&lt;P&gt;The code does work but i am trying to do all of them at one time. the code only does one at a time.&lt;/P&gt;&lt;P&gt;I am thinking i need to do a spatial join first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 18:49:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637382#M49643</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2016-03-23T18:49:47Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637383#M49644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Couple questions:&lt;/P&gt;&lt;P&gt;1. what version of ArcGIS are you running?&lt;/P&gt;&lt;P&gt;2. how are you running the script? Inside ArcMap/Catlog python window, IDLE, standalone, etc&lt;/P&gt;&lt;P&gt;3. It looks like the syntax highlighter or copy paste didn't get the correct indents for lines 6-8. I tried to edit the original post so make sure you get a clean copy or adjust your version.&lt;/P&gt;&lt;P&gt;4. Is your line 5 the same as mine? for row1 in cursor1:&amp;nbsp; .... if so then something is wrong with the cursor. are all the names spelled correctly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 18:51:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637383#M49644</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2016-03-23T18:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637384#M49645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should loop all the features in the point feature class.&amp;nbsp; If you're in ArcMap and you have any features selected it will only execute on those selected features so make sure you unselect all features in the point layer before running the code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 18:53:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637384#M49645</guid>
      <dc:creator>FredSpataro</dc:creator>
      <dc:date>2016-03-23T18:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Compare field attributes</title>
      <link>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637385#M49646</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. 10.2.2&lt;/P&gt;&lt;P&gt;2. In Arcmap python window&lt;/P&gt;&lt;P&gt;3. i did catch that indent and fixed before i ran the code.&lt;/P&gt;&lt;P&gt;4. row1 in cursor1:, same as you have it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The names are spelled correctly. Although the polygon "SiteAddres" filed address are upper case for example, "2120 RANCH RD".&lt;/P&gt;&lt;P&gt;Where the polygons layers "SiteAddres" are proper case for example, "2120 Ranch Rd".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2016 20:16:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/compare-field-attributes/m-p/637385#M49646</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2016-03-23T20:16:39Z</dc:date>
    </item>
  </channel>
</rss>

