Select to view content in your preferred language

Batch Add Fields, Model Builder

8837
11
Jump to solution
02-09-2015 07:00 AM
Randy_A_Stapleton
New Contributor III

Hi All,

 

Can anyone suggest a better way to batch add fields using the model builder? See attached image.

 

 

Thanks,

1 Solution

Accepted Solutions
ToddPayne1
New Contributor II

You can start with the Add Field tool in a Model, right-click the tool and Make Variable - From Parameter. Field Name would be the first one you need. Open it's Properties and set to List of Values. Open the Parameter and you can do all kinds of interesting things like Insert values from a table...

Add any other Variables from Parameters as needed to accommodate different field design across fields.

View solution in original post

11 Replies
HabG_
by
Occasional Contributor

Hi Randy,

Have you tried to batch add fields by right clicking the Add Field Tool in the Data Management Tools>Fields Toolset?

0 Kudos
TimWitt2
MVP Alum

I think he wants it within the model builder, not doing it manually.

Randy_A_Stapleton
New Contributor III

Yes. Within the model builder.

0 Kudos
ToddPayne1
New Contributor II

You can start with the Add Field tool in a Model, right-click the tool and Make Variable - From Parameter. Field Name would be the first one you need. Open it's Properties and set to List of Values. Open the Parameter and you can do all kinds of interesting things like Insert values from a table...

Add any other Variables from Parameters as needed to accommodate different field design across fields.

BlakeTerhune
MVP Regular Contributor

I'm not too experienced with Model Builder and I didn't know about this. Thanks!

0 Kudos
ToddPayne1
New Contributor II

What I like is with a List of Values, you only need one Add Field tool in the Model.

Randy_A_Stapleton
New Contributor III

Yes. I wanted to simplify my model. Thanks, Todd.

0 Kudos
ToddPayne1
New Contributor II

Sure thing. GeoNet is cool!

Randy_A_Stapleton
New Contributor III

Thank you. This is what my model looks like now. Batch_AddField_02.PNG