AnsweredAssumed Answered

Alter Field GP Tool on Spatial Views in Python Not Working

Question asked by sxweagle-co-nz-esridist Employee on Aug 26, 2014
Latest reply on Nov 25, 2014 by narnold

I'm having an issue with the "Aleter Field" gp tool in python. I find that it works fine when running the tool from Desktop or in a model, but as soon as I run it from python, it doesn't work and resets all my alias field back to the field names. This only occurs for spatial views I setup, works fine on feature classes.


Steps to reproduce

- Setup a spatial view.

- Setup a few field aliases in ArcGIS Desktop for the spatial view.

- Run the "Alter Field" gp tool from python on one field e.g. arcpy.AlterField_management(spatialView, "PERMIT_NUMBER", "", "Permit Number")

- Navigate to the spatial view in ArcGIS Desktop and notice that all the field aliases have been reset to the field names.