I have a survey made from survey 123, I have a point layer representing assets. The goal is to complete the survey for every asset. I have a field in my points layer called CompleteY_N, by default the attribute is 'Not Completed'. I want the attribute to change to 'complete' as a survey it summited and loop through until all assets say complete in the CompleteY_N field.
I wrote a script that selects by location and then uses UpdateCursor to change the attribute to complete. I have also used field calculate to change the selected features to complete ( not sure which way is better).
I am not sure how to do a loop like this, or if I have even explained what I am trying to do correctly.
Here is my script.
# Input property
inPropertypntfc = r"G:\GIS\ESRI\Staging\Survey123\Testing\New File Geodatabase.gdb\propertypnts"
# input survey feature class
inSurveyfc = r"G:\GIS\ESRI\Staging\Survey123\Testing\New File Geodatabase.gdb\retailpt2"
# Make feature layer of feature classes to allow selection
# select intersecting points
arcpy.SelectLayerByLocation_management("Propertypntlyr", "INTERSECT", "Surveylyr")
# Update Cursor for point layer
cursor = arcpy.da.UpdateCursor("Propertypntlyr", ["CompleteY_N"])
for row in cursor: