You can iterate through the fields and only search the permit fields. Ex:fc = "permits" for field in arcpy.ListFields(fc): #Specify all none permit fields if field.name != "OBJECTID" and field.name != "Shape" and field.name != "Shape_Length" and field.name != "Shape_Area" and field.name != "GlobalID" and field.name != "HasPermit": with arcpy.da.UpdateCursor(fc, [field.name, "HasPermit"], "NOT " + field.name + " IS NULL") as cursor: #if query is valid, set hasValue variable to 'true' hasValue = 'true' if hasValue == 'true': for row in cursor: row[1] = "YES" cursor.updateRow(row) hasValue = 'false' del cursor, row