AnsweredAssumed Answered

Search and Update Cursor Need help.

Question asked by hchapa89 on Dec 9, 2013
Latest reply on Dec 11, 2013 by hua17
I am trying to update a shapefile by using search and update cursor.
It searchs great on of the shapefile but when I try to update the other it only retrieves the first data.
I am providing my code so anyone could tell me how to modify it.


import arcpy  fc = "C:/Users/hchapa.LRGVDC911.000/Documents/ArcGIS/Default.gdb/Test_Shapefile_SpatialJoin" field = "parcel_1"   fc2 = "C:/GIS_DATA/Test_Shapefile.shp"   field2 = "parcel" value = [] cursor = arcpy.SearchCursor(fc) UpdateCursor = arcpy.UpdateCursor(fc2)    for row in cursor:     value = row.getValue(field)     for row2 in UpdateCursor:         row2.setValue(field2, value)         UpdateCursor.updateRow(row2)        print "Done"




the problem it only gets the first number but it doesnt iterate to the second number.

What am I doing wrong.

P.S I already try many other solutions nothing works.

I tried using a list.

Outcomes