AnsweredAssumed Answered

UPDATE MULTIPLE ATTRIBUTE

Question asked by CCweedcontrol on Jul 19, 2016
Latest reply on Jul 19, 2016 by Alexander_Brown-esristaff

I have a feature class with filed DXF_TEXT and FZONE_CODE i would like to search for certain attributes in the DXF_TEXT field and update the FZONE_CODE but i am not sure what the best was to do it. i have tried the following but i can only do one at a time.

 

I would like to add more to the if row[0]== "R32558011","R32747010", "R32842", "R32839":

How can i search for "R32558011","R32747010", "R32842", "R32839" and update those select FZONE_CODE to " " (blank)?

 

Thanks.

 

with arcpy.da.UpdateCursor("C:\TEMP\FZon2", ['DXF_TEXT', 'FZONE_CODE']) as cursor:

    for row in cursor:

        if row[0] == "R32558011": #"R32747010", "R32842", "R32839":

            row[1] = " "

            cursor.updateRow(row)

Outcomes