clthompson

Fieldmapping in Append doesn't work in Modelbuilder

Discussion created by clthompson on Nov 18, 2011
Latest reply on Nov 24, 2011 by nahmed-esristaff
I've created a model that appends (gp/datamanagement/general tool) features from shapefiles into comparable features in a geodatabase.  I use the No_test option and map fields from the input shapefile into fields of the target feature class.  However, this doesn't seem to work because it seems the fieldmapping is following the index order of fields in the inputs and because i'm not bring all input fields into my geodatabase, the sequence of fields doesn't match.  My input shapefile has the following fields:
FN,Type,Unit_num,Comment,Max_PDOP,Corr_Type,Rcvr_Type,GPS_Date,GPS_Tim,Feat_Name,Datafile

The mapping brings all those except the Rcvr_Type field into the GDB feature class.  When i run the model, it fails because it tries to put the Rcvr_Type field into the GPS_Date field.  So apparently the tool is simply going in order of the fields encountered in the Shapefile and ignoring the fieldmapping.

Has anyone seen this? I may have to write a python script to do this if the modelbuilder approach doesn't work, but i'm just curious why the field mapping information would be ignored.

Outcomes