Remove join table name from the field name- model builder

956
2
08-17-2011 11:52 AM
MarkVolz
Occasional Contributor III
Hello,

I an using model builder to join a table to a layer, then exporting that layer into a shapefile that permanently contains the data from the joined table.  At this time I am using "feature class to feature class to create my new shapefile."  The model seems to work, however I have a couple questions:

1)  By default most of the functions like to use field_join table as the name.  Feature class to feature class does allow us to rename fields.  However, it is time consuming to remove the table name from each of the field names.  Is there a quicker way?

2) When using feature class to feature class, is there a way to permanently control the field order.  Even if the layer file has been reordered and we use it as an input, feature class to feature class reverts back to the old field order.

Thanks
0 Kudos
2 Replies
FrankVignati
Occasional Contributor II
1. right click on your model goto properties => environments => fields and make sure "Maintain fully qualified field names is unchecked"
do the same for geoprocessing => environments in arccatalog, this should take of that
2. the only way to do this tat i know of is to make a templte feature class with the fields as you want them then in you model copy the template as new feature class and append the new records to it
BillRose
New Contributor III
Here's another suggestion to complement Frank's response: create a spatial view and/or standard SQL view for your sources before doing the join. This will weed out any fields you don't want displayed in the output. And I believe it will provide some control over field order, though probably not over OBJECTID and other special fields.

Joins that use layers and table views insist on keeping all fields in the output, even when you've excluded them in your model.
0 Kudos