Batch Rename Field Alias

5803
6
10-03-2015 12:14 AM

Batch Rename Field Alias

So this was just a play tool idea I had, but I ultimately was not pleased with how I ultimately handled the inputs. The input is literally text, and I thought about remap tables or other objects but was not sure it was much better. I actually would like input or advice on an appropriate input past the solution I made.

Code is revealed in the the script folder, but the main thing I have been playing with is functions to assist in tool creation such as ArcPrint and the get field index functions which I used with DA cursors a little bit. If anyone has any good patterns for indexing by field name with DA cursors I would love to hear it.

I am no longer supporting this tool, so it is really provided on this page as is. If there is a strong desire for an update please comment below. 

Summary

This scripting tool is designed to take in multiple field-alias pairs to rename multiple fields simultaneously. This tool is intended to make backend data preparation for web maps where revealed names should be understandable to the application user or for back-end data management for formatted or frequently updated data. If you have standard data, you can save the run for this tool and apply it to applicable areas.

Usage

This tool is really designed to help make renaming field aliases for data management or web display purposes potentially easier, specifically formatted data that might be used again (census data, private data, etc) or data that is updated on a regular basis.

Attachments
Comments

Many thanks! Extremely helpful.

You're a good lad.

Thanks! I am glad someone found this useful. 😃

Hi David.

Thank you so much for the tool you shared, it's awesome.

Nevertheless, I'm using Arcgis desktop 10.2 and for some reason the tool doesn't work tha way I want.

Could be because the version that I'm using?

Hi MINVU,

The toolbox itself is a 10.3 toolbox so that might be a source  of a problem. That said, the code itself is not using 10.3 only functions I think. It is possible you could create a new toolbox and import the script and recreate the input parameters for the tool based on the help file. I hope this helps. Other than that I am not sure what could be the source of the problem.

David

Hello David,

This tool has been incredibly helpful for my school term project! I've been stuck on trying to re-name aliases in bulk for about 2 and a half weeks now. I have 32 attribute tables, each with 299 columns. Although I can't do all 299 fields at once, 70 at a time has been working for me. Thank you so much for posting.

Hi Erica, 

Glad this could help. 

I have a feeling the rename field tool that this depends on has a degree of instability. I have actually corrupted a few files using rename field or delete field excessively (why I copy features before doing huge changes or make changes in other software like pandas/excel). As stated before in the post, I am no longer supporting this tool, so I am glad it is still working as is (this tool continues to get wide use, so I might try to see what can be done on the stability end, but this is a lower priority for me). 

David

Version history
Last update:
‎10-03-2015 12:14 AM
Updated by:
Contributors