mrivera

IF Statement and Update Cursor, Checking to see if text field is empty is not working

Discussion created by mrivera on Jul 21, 2011
Latest reply on Jul 21, 2011 by mrivera
I'm using the following code:

cur=arcpy.UpdateCursor("parsolak.shp")

for row in cur:
    if row.PARCEL_NO == "":
        row.PARCEL_NO = "R-O-W"
        cur.updateRow(row)

del row,cur

I know the script is accessing the parsolak.shp shapefile because I see a lock on it.  The mission is if any polygons have nothing in the PARCEL_NO field to populate the field with "R-O-W".  When I reopen the shapefile, there are still 14,000+ records with nothing in the PARCEL_NO field.

Any help would be appreicated, thanks.

Outcomes