I have a model builder model to run zonal statistics as a table on multiple rasters and merge the output table into one table

However, I would like to add a field to the merged output table that identifies each each record by it's raster name.

Since I'm new to figuring this out, can someone tell me what steps I need to add in order to make that happen?

See image attached.


enter image description here

1 Answer 1


First thing is to get the structure of your model correct:

You need to put your Iterator>Zonal Stats>Collects tools in a sub-model and expose the collects tool as a parameter. Then that model is a sub-model that feed into the Merge tool. Have a look at this thread

Then insert the add field>calculate Field tools after your zonal stats tool and the output of the calculate field feeds into the collects tool. Finally use inline substitution as the expression in the field calculate tool. If you don't know what that is then read the help file as there are numerous examples.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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