Iterate Feature Selection (ModelBuilder)

Summary

Iterates over features in a feature class.

Learn how Iterate Feature Selection works in ModelBuilder

Usage

  • This tool is only available from ModelBuilder for use in models. The tool is not available from the Geoprocessing pane or from Python.

  • Complex feature classes, such as annotation and dimensions, are not supported by this tool.

  • More than one group by field can be used for the selection. If one or more group by fields are specified, the number of iterations is determined by the number of unique combinations of the group by fields. For each iteration, the selection of the output feature layer is determined by the number of records that match the given combination of the group by fields. If more than one group by field is specified, the values are concatenated <field value1>_<field value2> in the output inline variable name. In the example below, two group fields, the name of the hurricane (NAME) and the category of the hurricane (Category), are used. The output value is Katrina_H5, and so on for the other values.

    Iterate Feature Selection tool parameters

  • If no group by field is specified, the output value will be grouped by the Object ID field, and the selection is one record per selection. If the table does not have an Object ID field, such as an Excel table, the value is blank.

  • The tool has two outputs: Selected Features and group Value of the field for selected features, which can be used as an inline variable in other tools.

  • The temporary feature layer can be saved as a layer file using the Save To Layer File tool or saved as a new feature class using the Copy Features tool.

  • If an iterator is added to a model, all tools in the model iterate for each value in the iterator. If you do not want to run each tool in the model for each iterated value, create a submodel, model within a model, or nested model that contains only the iterator and add it as a model tool to the main model.

Parameters

LabelExplanationData Type
In Features

The input feature class or layer containing the features that will be iterated.

Feature Layer
Group By Fields
(Optional)

The input field or fields that will be used to group the features for selection. Any number of input fields can be defined, resulting in a selection based on a unique combination of the fields. If no field is specified, the Object ID will be used to iterate over features.

Value Table
Skip Null Values
(Optional)

Specifies whether null values in the grouping field or fields will be skipped during selection.

  • Checked—The null values in the grouping fields will be skipped during selection.
  • Unchecked—The null values in the grouping fields will not be skipped during selection. This is the default.
Boolean

Derived Output

LabelExplanationData Type
Selected Features

A feature layer that can be used in other geoprocessing tools that accept a feature layer in ModelBuilder.

Feature Layer
Value

The field values returned by each iteration. If more than one group by field is specified, the values are concatenated <field value1>_<field value2>.

Variant

Environments

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics