Add multiple fields in Model builder

15981
5
01-09-2014 05:11 AM
KarinHenrikson
New Contributor II
Hi
I hope someone can help me with this issue. As usual I thought it would be simple, but I can't figure it out...

I want to add many fields to a feature class in a geodatabase. I need to to this in model builder, since it is a part of a bigger model.

I have been trying to use different iterators and the tool "add field" togehter with a separate table with the field names. But I can't get it to work ( I am a beginner with model builer).

Does anyone have a solution for this? I would be greatful! The faster the better!
Thanks!

Karin Henrikson

ps. I use ArcGIS 10.2
5 Replies
GeraldineEGGERMONT
New Contributor II
Hello Karin,

This post might help you. If your field names are in a table, you should use the Row Selection instead of the Multivalue iterator.

Geraldine
0 Kudos
LindsayUnderhill
New Contributor

This link does not work - could you repost? Many thanks.

0 Kudos
KarinHenrikson
New Contributor II
Thanks for your fast reply Geraldine!
Actually I did find out just after psting the thread by using the Select Row iterator.
It works just perfectly!

/Karin
0 Kudos
LauraRead
New Contributor

Karin (or anyone else!),

Can you perhaps point me to that post, or give some insight as to how you made this happen?  I am unable to figure out how to "Add Field" multiple times to a single shapefile, producing an output shapefile with new fields for which I can then use "Calculate Field" to perform a field calculation.

Thanks
Laura

ChrisDonohue__GISP
MVP Alum

 I can get it to work by chaining Add Fields together in Modelbuilder.  Can you describe what you have tried and what seems to be going awry?  Are you using an Iterator? Also, any chance the shapefile naming conventions are tripping things up?

Also note - Add Field doesn't produce a new shapefile, but adds a field to an existing shapefile.  So if you need the original shapefile maintained without the new fields, make a copy of it first.

ArcGIS Help (10.2, 10.2.1, and 10.2.2) - Add Field (Data Managment)

0 Kudos