Skip To Content

If Row Count Is

Summary

Evaluates if the row count of the input data matches a specified value.

Learn how If Row Count Is works in ModelBuilder

Usage

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

  • The tool has two Boolean outputs, True and False. Based on the condition being evaluated one of the two boolean outputs is true and the other false after the tool runs. These boolean outputs have to be set as a precondition to the downstream tools for those to execute if either of the preconditions is true.

Syntax

RowCountIfThenElse_mb (in_layer_or_view, {count_condition}, {count}, {count_min}, {count_max})
ParameterExplanationData Type
in_layer_or_view

Input layer or table view to evaluate.

Table View
count_condition
(Optional)

The condition to test the field values of the records matching the SQL expression.

  • IS_EQUAL_TOChecks if the row count is equal to the Count value.
  • IS_BETWEENChecks if the row count is between the Minimum Count value and Maximum count value.
  • IS_LESS_THANChecks if the row count is less than the Count value.
  • IS_GREATER_THANChecks if the row count is greater than the Count value.
  • IS_NOT_EQUAL_TOChecks if the row count is not equal to the Count value.
String
count
(Optional)

An integer count value.

Long
count_min
(Optional)

A minimum integer count value.

Long
count_max
(Optional)

A maximum integer count value.

Long

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes