0

I am trying to iterate through an excel with over 200 sheets and join each to a ZIP code layer. I then need to symbolize each of those the three different ways and save that to a layer file. In order to do that, I need the model to keep the original field names so the symbology can be done for all. Here is what my model looks like enter image description here

I have tried multiple routes to keep the field names. Utilizing the field info variable from Make Feature Layer, I can have the fields from the layer I am joining to (ZIP 2014) keep their original names, but the fields from the table still use the "Sheet__fieldname" convention and the fields from the table are what I have to base the symbolization on. I have unchecked maintain fully qualified field names for the Model properties as well as for the individual tools, and that doesn't work.

My only workaround has been to export everything in the model as is, then create another model and use feature class to feature class to change the field names. I truly believe there has to be some way to get all this done in one swoop.

I am using ArcMap 10.2.2

  • Welcome to GIS SE. Can you please edit the question and state what software (including the version) you are using. – Kersten Jul 1 '15 at 15:05
1

I finally got it to work by making "Maintain fully qualified names" a variable from the environment. I did it for both the make feature layer and copy features just in case. I also made another variable for field info, but I'm not sure if that had anything to do with it working. It's really frustrating that changing the environment settings alone doesn't work. I swear before that just altering the environment fields setting worked, but maybe I didn't recreate exactly which settings I changed. Either way, creating a variable for it worked! I was also able to have layers created correctly for all the feature classes.

enter image description here

  • Thanks so much for this. I was trying to solve this for ages! By adding it as a variable worked! – MacroZED Apr 1 '16 at 13:23
0

Just an idea but if your output was a GeoDatabase Featureclass rather than a Shapefile you could use the Alter Field tool to rename it back as part of the work flow of the model?

0

You should be able to use this option: http://resources.arcgis.com/en/help/main/10.1/index.html#//001w00000008000000

I am sure you can get there with field mappings if that doesn't work, but it would likely be a lot more lines of code than what youd expect.

https://geonet.esri.com/thread/30539

  • This could be considered a link only answer and may be flagged as low quality. It's best to provide some explanation and context here in the event links go dead in the future, rendering the answer useless. For example, the help page you link to is for "Qualified Field Names (Environment setting)" - how would you apply this to solve the problem? What is discussed at the GeoNet thread you link to and how does it apply? – Chris W Jul 3 '15 at 1:27
  • Hey Chris... Ya weak and prone to the URL becoming outdated.... But from Morgans final comments, it set her on the right path. Sorry, I will try and add better detail into my responses. Thanks – Mike Oct 5 '15 at 17:05
0

i am not sure if you got this answered . i am not very good with model builder , but your basis of your problem seemed similar to the one i had

when i was making layers for each unique value within a feild. I was using the value for the deinfation query and the name. But i ran into problems as the value could be john/ street. So when it was used in the defination query it would work , but when i tried to use it for the file name it would not save becuase of the / character. The solution was basically to have two seperate list that i was working with . One that would be the original content and would be used within the defination and one that would be used within the.

Is there was maybe you could build a list of your original field names in model builder That can be made into a dictionary . i am not sure if this is possible in model builder. But if it is

if you had the following feilds , Feild_A , Feild_B , Feild_c , Field_D.

you could make a list that would give you an sheet_feild_A , sheet_feild_B,sheet_feild_C,sheet_feild_D.

Then maybe you could combine your two lists into a dictionary where the Key is original field name and your value is your new feild name. Feild_A = sheet_feild_A

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.