I am using this code to update only the records that have the field PlanID blank. It works fine if the field shows nothing, but not if it has a null value like <null>. The field type is string ad the data is in SDE. Any ideas? Thank you?
with arcpy.da.UpdateCursor(Input_Polygons, ("DateStart", "PlanID", "FFY")) as rows: for row in rows: if row in ("", " ", "None", "Null", "<Null>"): #covers blank, one blank space, or Null Datestarstr1 = row Datestarstr2 = str(Datestarstr1) yearonly = Datestarstr2[0:4] row = yearonly rows.updateRow(row)