Permanently Reorder Fields in Feature Class (SDE)

Jump to solution
08-20-2015 07:09 AM
New Contributor III

I admit I have not beat the internet or ArcGIS Help to submission in finding an answer but in my brief travel I have not found an acceptable answer.

The question is, is there a way to permanently reorder fields via ArcMap, ArcCatalog or other?

Would really, really help with configuring pop-ups within an AGOL web map.

Tags (1)
14 Replies
Frequent Contributor

Not to my knowledge.  You can reorder fields on versioned data, you just have to do both the business table and the add table. 

0 Kudos
MVP Frequent Contributor

But would in-version, re-version work?  Some of the datasets I want to reorder are 300+ fields so getting it all just perfect will be tough. 

0 Kudos
Esteemed Contributor

It appears that we are left with one option: to use the “feature class to feature class” tool that allows rearranging the fields but again this ends up with new feature class

Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
Esri Contributor

Related idea on this subject.

0 Kudos
MVP Honored Contributor

While this still involves creating a new feature class to replace the original, at ArcMap 10.5.1 you can now use the Spatial Join tool to reorder the fields using the up and down arrows.  You can also add completely new fields with the PLUS arrow and insert them in the order you want them to be stored using the arrows.  You can even populate the new fields from the fields of your original feature class or the spatially joined feature class.

The tool field view also lets you rename the fields.  The only restriction in renaming fields involves trying to rename one field while at the same time trying to give another field the name that the first field originally had, since the tool will cross-link the data or otherwise get confused. 

You can also use the Spatial Join field view properties to change the field type, Null rules and field lengths of your fields, including shortening the field length, provided all of your data is compatible with the new field set up (i.e., the tool fails if any value cannot automatically convert and fit in the length and range of values for the new type, or violates a rule prohibiting Nulls).

As long as you use the keep all target features rule of the Spatial Join tool you can avoid adding all but two new fields to your original schema by using a join feature class layer with a definition query of OBJECTID < -1 and the visibility of all its fields turned off. In the end you just need to drop the Join_Count and TARGET_FID fields to get all of your features with only the original schema fields all permanently in the new order, with the new field names, types and Null rules.  (The TARGET_FID field is actually very useful if you need to rebuild relationships that were dependent on the original OBJECTID values before replacing the original feature class).  And you can use ModelBuilder to save the tool set up or export the tool set up to a Python script for easy reuse.

Although I have not actually verified that it works with any other tool except the Summary Statistics tool yet, it is possible that other tools that have a field map now support these changes in ArcMap 10.5.1.  If I find that it works for any other tools with a field map I will post back here with the tools that work.