Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to simultaneously delete fields in Modelbuilder? I want to be able to remove excess fields from an iterative join of near tables. All of the fields I want to delete and keep are similarly named (ex: NEAR_FID). I have 40+ copies of that variables named this way in one table.

share|improve this question
up vote 7 down vote accepted

Just use the Delete Field tool.

This tool deletes one or more fields from a table, feature class, feature layer, or raster dataset.

After you get it linked up to your layer, it gives you checkboxes for all the fields you want to delete. If you they all start off with the same name (ie- NEAR_FID), you will probably end up seeing a series of NEAR_FID_1, NEAR_FID_2, NEAR_FID_3, etc). You run the Delete Field tool at the end of your model to clean up all of the fields you don't want.

share|improve this answer
Just a heads up, as ModelBuilder has always been very finicky with me, you may not be able to select the fields if they are created during the model as they don't currently exist in the layer. If this happens you can create a text variable in the model as the output of the join and then the input of the delete. – AlmaThom Jun 3 '13 at 19:04
thank you both. @almathom that was exactly the issue I was running into. is there anyway to be able to use wildcard with this tool? – ajeedee Jun 3 '13 at 19:24
If it is a static model, and you always expect to delete the same fields, every time, run the model (in ModelBuilder, not as a tool) UP TO THE STEP BEFORE THE DELETE FIELD TOOL, and when you open up the Delete Field tool (in your model), the new fields should now be visible. Pick you fields to delete and run the model to completion (still in Model view). If you save the model in the "completed" state, it will usually cache the field names for future use. – RyanDalton Jun 3 '13 at 20:02

Without knowing how all of your fields are created in the model, a possible solution is to make a variable out of a tool parameter and then feed those variables into the Delete Field tool. This avoids the problem of the fields not being selectable directly through the Delete Field tool.

share|improve this answer

You could try using 'Feature Class to Feature Class'. You can copy over a dataset and set the field map.

I can't test this now for you but I hope it helps.

share|improve this answer
why would you use this instead of the Delete Field tool? – Midavalo Apr 29 at 5:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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