Hi,
I'm finally converting 2x scripts to 3x and I'm getting poor results from the same code. Exact same code running under the two different environments, different results.
Here is the code. Simple merge of three layers into one, mapping only one field. In 3x it will not populate the field from one of the layers. Works fine in 2x. What changed or what do I need to change in the new API.
I should mention that for testing purposes, all FCs are in the same, new file geodatabase.
fldFolio = arcpy.Field()
fldFolio.name = 'Folio'
fldFolio.aliasName = 'Folio'
fldFolio.type = 'Text'
fldFolio.length = 12
fldFolio.isNullable = True
fm = arcpy.FieldMap()
fm.outputField = fldFolio
fm.addInputField(PIDless_lyr, 'Folio', 0, 12)
fm.addInputField(target_ParcelsSingle, 'BCA_Legal_Folio', 0, 12)
fm.addInputField(target_ParcelsStrata, 'BCA_Legal_Folio', 0, 12)
fms = arcpy.FieldMappings()
fms.addFieldMap(fm)
# merge everything
print('Merge all Except MHs')
arcpy.Merge_management([PIDless_lyr, target_ParcelsSingle, target_ParcelsStrata], target_ParcelsTmp1, fms)