prieger

error in fieldmapping/merge example?

Discussion created by prieger on Apr 28, 2012
Latest reply on May 1, 2012 by dlee-esristaff
I've been trying for hours to get the code in "Merge example 2 (stand-alone script)" on the "Merge (Data Management)" help file page(http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//001700000055000000) to run, and finally realized that there appears to be an error in this ESRI-provided script.

In the line: 
fieldMappings.RemoveFieldMap(fieldMappings.FindFieldMapIndex(field.name))

The words "Remove" and "Find" should not be capitalized.  That is, the correct method names are "removeFieldMap" and "findFieldMapIndex", so the correct line is:
fieldMappings.removeFieldMap(fieldMappings.findFieldMapIndex(field.name))

Can someone from ESRI confirm/correct the help file? (or let me know why I'm wrong)

This is for ArcGIS 10. Thanks.

Outcomes