Updating feature class based on a list

Discussion created by reaglebeagle on Aug 7, 2012
Latest reply on Aug 8, 2012 by reaglebeagle
I have a python list of ID's and if they match the ID's in my feature class, I'd like to update a field called 'poles_update' with the word "ADD".

my python list is called 'newpoleList'. The ID's in newpoleList, when they match POLE_ID in my FC, I want to update the field "poles_update". The following doesn't seem to work. I'd appreciate it if someone could tell me where I am going wrong here..

for p in newpoleList:
    if p not in existpoleList:
            rows = arcpy.UpdateCursor(FC)
            for row in rows:
                if row.POLE_ID == p:
                    row.poles_update = "ADD"