AnsweredAssumed Answered

How to check of a field exists in arcpy.FieldMappings

Question asked by jsn on May 8, 2017
Latest reply on May 8, 2017 by bixb0012

Hello everyone,

 

Is there a way to check if a field exits in a arcpy.FieldMappings

 

fieldmappings = arcpy.FieldMappings()
fieldmappings.addTable(fc1)
fieldmappings.addTable(fc2)

 

if fieldmappings.findFieldMapIndex("SHAPE_LEN")   ??????  how to check that this field exists to remove it?
  print"not found"

Outcomes