Usage
This tool is intended for use in ModelBuilder and not in Python scripting.
The output of the tool is a variable named Value and contains the value of the field. This variable can be used in for inline variable substitution (%Value%).
The Data Type parameter specifies the data type of the output variable. The default data type is string, but depending on how the output will be used in the model, different data types may be specified. For example, if your field contains the path to a feature class, you can set the Data Type 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 sub-model/model within a model/nested model that contains only the iterator and add it as a model tool into the main model.
Syntax
IterateFieldValues(in_table, field, {data_type}, {unique_values}, {skip_nulls}, {null_value})
Parameter | Explanation | Data Type |
in_table | The input table to be iterated over. | Table View |
field | The input field for iteration. | Field |
data_type (Optional) | Specifies the data type of the output value. The default data type is String, but depending on how the output will be used in the model, different data types may be specified. For example, if your field contains the path to a feature class, you can set the Data Type 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_nulls (Optional) | Specifies whether null values in the field will be skipped.
| Boolean |
null_value (Optional) | The null value to skip, such as -9999, Null, -1. The default values are "" for strings and "0" for numbers. | String |
Derived Output
Name | Explanation | Data Type |
value | The field value returned by each iteration. | Any Value |
Environments
Licensing information
- Basic: Yes
- Standard: Yes
- Advanced: Yes