arcpy.MakeFeatureLayer(fc, "lyr", "MY_FIELD in ('A','B')": if int(arcpy.GetCount_management("fl").getOutput(0)) > 0: arcpy.CalculateField_managment("fl", "MY_FIELD", "None", "PYTHON")
arcpy.MakeFeatureLayer(fc, "lyr", "MY_FIELD in ('A','B')": if int(arcpy.GetCount_management("fl").getOutput(0)) > 0: arcpy.CalculateField_managment("fl", "MY_FIELD", "NULL", "VB")
def testIt(field): if field in ['A', 'B']: field = None return field
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.