AnsweredAssumed Answered

FieldMap: Error in adding input field to field map

Question asked by AJZumwalt9 on Feb 13, 2019
Latest reply on Feb 19, 2019 by AJZumwalt9

Here is my code:


I keep getting the error: "FieldMap: Error in adding input field to field map." This is my first time using field mapping, and I'm a little confused.


consumer="C:/Users/azumwalt.UECOOP/AppData/Roaming/ESRI/Desktop10.4/ArcCatalog/ElectricModel - azumwalt.sde/consumer"

fm_mapname = arcpy.FieldMap()
fm_phasing = arcpy.FieldMap()
fms = arcpy.FieldMappings()

fm_mapname.addInputField(point, "WMMAPNAME")
fm_phasing.addInputField(point, "WMPHASING")

type_mapname = fm_mapname.outputField = "esMapName"
fm_mapname.outputField = type_mapname

type_phasing = fm_phasing.outputField = "esPhasing"
fm_phasing.outputField = type_phasing


arcpy.Append_management(point, consumer, "", fms, "1")