ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

Iterate Row Selection

  • Summary
  • Usage
  • Syntax
  • Environments
  • Licensing information

Summary

Iterates over rows in a table.

Learn how Iterate Row Selection works in ModelBuilder

Usage

  • This tool is intended for use in ModelBuilder and not in Python scripting.

  • Iterate Row Selection calls Make Table View to select a table record and creates two outputs: Selected Rows and Value. The output Selected Rows is a Table View and can be used as inputs to other geoprocessing tools that accept a Table View as input in ModelBuilder.

  • More than one group by field can be used for the selection. If one or more group by fields are selected, 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 chosen, then the values are concatenated <field value1>_<field value2> in the output inline variable name. See an example below where two group fields: call type and the crime period are used. The output Value is Vandalism_Morning and so on for the other values.

    Group Field

  • If no group by field is chosen, the output value is the group by ObjectID field, and the selection is one record per selection.

  • The tool has two outputs: Output Selected Rows and group Value of the ObjectID field for selected features, which could be used as in-line variable %Value% in other tools.

  • 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

IterateRowSelection(in_table, {fields}, {skip_nulls})
ParameterExplanationData Type
in_table

Input table containing records to iterate through.

Table View
fields
[[Field, Null Value],...]
(Optional)

Input field used to group the records for selection. Any number of input fields can be defined, resulting in a selection based on a unique combination of the fields.

Define the null value for the field. By default, null values are included in the selection unless specified or the option to skip all null values is checked. The default values are "" for strings and "0" for numbers.

Value Table
skip_nulls
(Optional)

Determines if null values in the grouping fields are skipped during selection.

  • Checked—Skip through all the null values in the grouping fields during selection.
  • Unchecked—Set as default. Include all the null values in the grouping fields during selection.
Boolean

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics

  • An overview of the Iterator toolset
  • A quick tour of using iterators

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2019 Esri. | Privacy | Legal