Iterate Field Values (Model Tools)
Summary
Iterates each value in a field.
Usage
This tool is only available from ModelBuilder for use in models. The tool is not available from the Geoprocessing pane or from Python.
The output of the tool is a variable named Value that contains the value of the field. This variable can be used in inline variable substitution (%Value%).
The Data Type parameter specifies the data type of the output variable. The default data type is string; however, depending on how the output will be used in the model, other data types can be specified. For example, if your field contains the path to a feature class, you can set the Data Type parameter to Feature Class and use the output variable as input to a tool that accepts a feature class.
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
| Label | Explanation | Data type |
|---|---|---|
|
Input Table |
The input table to be iterated. |
Table View; Raster Layer |
|
Field |
The input field for iteration. |
Field |
|
Data Type (Optional) |
Specifies the data type of the output value. The default data type is string; however, depending on how the output will be used in the model, other data types can be specified. For example, if your field contains the path to a feature class, you can set this parameter to Feature Class and use the output variable as input to a tool that accepts a feature class.
|
String |
|
Unique Values (Optional) |
Specifies whether iteration values will be based on unique values.
|
Boolean |
|
Skip Null Values (Optional) |
Specifies whether null values in the field will be skipped.
|
Boolean |
|
Null Value (Optional) |
The value that will be used to replace null values in the field, such as -9999, Null, or -1. The default for string fields is "" and 0 for numeric fields. |
String |
Derived output
| Label | Explanation | Data type |
|---|---|---|
|
Value |
The field value returned by each iteration. |
Any Value |
Environments
This tool does not use any geoprocessing environments.
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes