'Iterate Field Values' for Multiple Fields in ModelBuilder

3335
3
09-06-2011 02:53 PM
EricStipe
New Contributor III
I have a model that iterates a process for each unique field value of [Type] field. The model aggregates polygons of a like Type, and at the end of the model a new field is created and populated with each unique [Type] for the aggregation using "%Value%" from the output of the iterator. These iterations are then appended and contained within a newly created feature class.

I would like to retain this attribution for each set of polygons(original [Type] value), but I would like to include another set of values to the iteration. That is, instead of iterating through each unique [Type] value, I would like to iterate through [Type] AND [Grouping]. The [Grouping] field is a simple Short field, containing only two unique values. Ideally, the aggregation would aggregate polygon clusters with like [Type] AND [Grouping] values, yet attribute the polygon with a single [Type] value, as well as a field with a [Grouping] value.

The problem that I am running into is that if i concatenate the two fields in before running  the iterator based on the concatenated field, the value output is concatenated, and my "%Value%" output no longer is correct for populating the field at the end of the model. Is there a way that I can use an iterator to select [Type] AND [Grouping], yet call on the [Type] value of the selection to populate the field at the end of the model?

I can post images of the model if it would help. I'm using ArcGIS 10.

Thanks,

Eric
0 Kudos
3 Replies
ShitijMehta
Esri Regular Contributor
Eric,

Please post a snapshot.

Also, try using Iterate Feature Selection or Iterate Row Selection iterator. You can group based on many fields to make a selection.
Then can you a Calculate Field to calculate what ever you want on that selection.
0 Kudos
EricStipe
New Contributor III
Thank you for your response,

I tried implementing the "Iterate Features Selection" tool, but now the model only runs for about 10 seconds and then completes and the resulting feature class is empty. When it was working before I was just aggregating based on one field [Type], it was working and took around 2 minutes.

I have attached two images, the first is the Iterated model, and the second is a shell model that calls on the iterated model.

Thanks,

Eric
0 Kudos
ShitijMehta
Esri Regular Contributor
Make sure your input has the field and field values on which the selection is being made.
I don't know why you are using Make Feature Layer on a selection from the iterator. You can directly connect it to the Aggregate Polygons tool.

If possible share your model.
0 Kudos