Currently with ArcPro the delete field tool in data management will generate a warning if a field doesn't exist in the input and error out the task. Now this might be a bug, as I don't think warnings are supposed to stop an iterating script dead in its tracks, but what if you made the code like so:
inFC = arcpy.GetParameterAsText(0)
ListOfInputFields = arcpy.GetParameterAsText(1)
ListOfInputFields = ListOfInputFields.split(";")
for delField in ListOfInputFields:
fldLst = arcpy.ListFields(inFC)
fldLst2 = 
for fld in fldLst:
if delField is in fldLst:
arcpy.AddMessage(deleteField + " was not found in " + inputFC)
Anyways just an idea. It's probably not the best way of writing out the code but maybe you get the point?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.