Iterate Field Values (ModelBuilder)

Summary

Iterates over each value in a field.

Learn how Iterate Field Values works in ModelBuilder

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})
ParameterExplanationData 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.

  • Address Locator —Address Locator
  • Address Locator Style —Address Locator Style
  • Analysis cell size —Analysis cell size
  • Any value —Any value
  • ArcMap Document —ArcMap Document
  • Areal unit —Areal unit
  • Boolean —Boolean
  • CAD Drawing Dataset —CAD Drawing Dataset
  • Calculator Expression —Calculator Expression
  • Catalog Root —Catalog Root
  • Cell Size —Cell Size
  • Cell Size XY —Cell Size XY
  • Composite Layer —Composite Layer
  • Compression —Compression
  • Coordinate System —Coordinate System
  • Coordinate Systems Folder —Coordinate Systems Folder
  • Coverage —Coverage
  • Coverage Feature Class —Coverage Feature Class
  • Data Element —Data Element
  • Data File —Data File
  • Database Connections —Database Connections
  • Dataset —Dataset
  • Date —Date
  • dBASE Table —dBASE Table
  • Decimate —Decimate
  • Disk Connection —Disk Connection
  • Double —Double
  • Encrypted String —Encrypted String
  • Envelope —Envelope
  • Evaluation Scale —Evaluation Scale
  • Extent —Extent
  • Extract Values —Extract Values
  • Facility Network —Facility Network
  • Feature Class —Feature Class
  • Feature Dataset —Feature Dataset
  • Feature Layer —Feature Layer
  • Feature Set —Feature Set
  • Field —Field
  • Field Info —Field Info
  • Field Mappings —Field Mappings
  • File —File
  • Folder —Folder
  • Formulated Raster —Formulated Raster
  • Fuzzy function —Fuzzy function
  • GeoDataServer —GeoDataServer
  • Geodataset —Geodataset
  • Geometric Network —Geometric Network
  • Geostatistical Layer —Geostatistical Layer
  • Geostatistical Search Neighborhood —Geostatistical Search Neighborhood
  • Geostatistical Value Table —Geostatistical Value Table
  • GlobeServer —GlobeServer
  • GPServer —GPServer
  • Graph —Graph
  • Graph Data Table —Graph Data Table
  • Group Layer —Group Layer
  • Horizontal factor —Horizontal factor
  • Image Service —Image Service
  • Index —Index
  • INFO Expression —INFO Expression
  • INFO Item —INFO Item
  • INFO Table —INFO Table
  • Internet Tiled Layer —Internet Tiled Layer
  • LAS Dataset —LAS Dataset
  • LAS Dataset Layer —LAS Dataset Layer
  • Layer —Layer
  • Layer File —Layer File
  • Line —Line
  • Linear unit —Linear unit
  • Long —Long
  • M Domain —M Domain
  • Map —Map
  • Map Server Layer —Map Server Layer
  • MapServer —MapServer
  • Mosaic Dataset —Mosaic Dataset
  • Mosaic Layer —Mosaic Layer
  • Neighborhood —Neighborhood
  • Network Analyst Class FieldMap —Network Analyst Class FieldMap
  • Network Analyst Hierarchy Settings —Network Analyst Hierarchy Settings
  • Network Analyst Layer —Network Analyst Layer
  • Network Dataset —Network Dataset
  • Network Dataset Layer —Network Dataset Layer
  • Parcel Fabric —Parcel Fabric
  • Parcel Fabric Layer —Parcel Fabric Layer
  • Point —Point
  • Polygon —Polygon
  • Projection File —Projection File
  • Pyramid —Pyramid
  • Radius —Radius
  • Random Number Generator —Random Number Generator
  • Raster Band —Raster Band
  • Raster Calculator Expression —Raster Calculator Expression
  • Raster Catalog —Raster Catalog
  • Raster Catalog Layer —Raster Catalog Layer
  • Raster Data Layer —Raster Data Layer
  • Raster Dataset —Raster Dataset
  • Raster Layer —Raster Layer
  • Raster Statistics —Raster Statistics
  • Raster Type —Raster Type
  • Record Set —Record Set
  • Relationship Class —Relationship Class
  • Remap —Remap
  • Route Measure Event Properties —Route Measure Event Properties
  • Schematic Dataset —Schematic Dataset
  • Schematic Diagram —Schematic Diagram
  • Schematic Diagram Class —Schematic Diagram Class
  • Schematic Folder —Schematic Folder
  • Schematic Layer —Schematic Layer
  • SemiVariogram —SemiVariogram
  • ServerConnection —ServerConnection
  • Shapefile —Shapefile
  • Spatial Reference —Spatial Reference
  • SQL Expression —SQL Expression
  • String —String
  • String Hidden —String Hidden
  • Table —Table
  • Table View —Table View
  • Terrain Layer —Terrain Layer
  • Text File —Text File
  • Tile Size —Tile Size
  • Time configuration —Time configuration
  • Time unit —Time unit
  • TIN —TIN
  • TIN Layer —TIN Layer
  • Tool —Tool
  • Toolbox —Toolbox
  • Topo features —Topo features
  • Topology —Topology
  • Topology Layer —Topology Layer
  • Transformation function —Transformation function
  • Variant —Variant
  • Vertical factor —Vertical factor
  • VPF Coverage —VPF Coverage
  • VPF Table —VPF Table
  • WCS Coverage —WCS Coverage
  • Weighted Overlay Table —Weighted Overlay Table
  • Weighted Sum —Weighted Sum
  • WMS Map —WMS Map
  • Workspace —Workspace
  • XY Domain —XY Domain
  • Z Domain —Z Domain
String
unique_values
(Optional)

Specifies whether iteration values will be based on unique values.

  • Checked—The iteration values will be based on the unique value of the specified field.
  • Unchecked—The iteration will run for each record in the input table.
Boolean
skip_nulls
(Optional)

Specifies whether null values in the field will be skipped.

  • Checked—Will skip through all the null values in the field during selection.
  • Unchecked—Will include all the null values in the field during selection.
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

NameExplanationData 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