If Selection Exists (ModelBuilder)

Summary

Checks whether the input data includes a selection and whether a certain number of records are selected.

Learn how If Selection Exists works in ModelBuilder

Usage

  • Use this tool to check whether the input data includes a selection or to identify the number of selected records.

  • This tool does not make a selection. It checks whether the number of selected records matches a specified value. Use the Select Layer By Attribute tool to make a selection in ModelBuilder. Use the If Field Value Is tool to check whether the input dataset includes records that match an SQL expression or where clause.

  • This tool is only available from ModelBuilder for use in models. The tool is not available from the Geoprocessing pane or from Python.

  • 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 is false after the tool runs. These Boolean outputs must be set as a precondition to the downstream tools for those to run if either of the preconditions is true.

Parameters

LabelExplanationData Type
Layer Name or Table View

The input layer or table view to check.

Table View; Raster Layer; Mosaic Layer
Selection Condition
(Optional)

Specifies the selection condition that will be used.

  • ExistsChecks whether any of the input's records are selected. This is the default.
  • No SelectionChecks whether none of the input's records are selected.
  • All SelectedChecks whether all of the input's records are selected.
  • Is Equal toChecks whether the number of the input's selected records is equal to the Count parameter value.
  • Is BetweenChecks whether the number of the input's selected records is between the Minimum Count parameter value and Maximum Count parameter value.
  • Is Less ThanChecks whether the number of the input's selected records is less than the Count parameter value.
  • Is Greater ThanChecks whether the number of the input's selected records is greater than the Count parameter value.
  • Is Not Equal toChecks whether the number of the input's selected records is not equal to the Count parameter value.
String
Count
(Optional)

The integer count value.

Long
Minimum Count
(Optional)

The minimum integer count value.

Long
Maximum Count
(Optional)

The maximum integer count value.

Long

Derived Output

LabelExplanationData Type
True

If the specified criteria evaluates to True, this parameter will be set to True.

Boolean
False

If the specified criteria evaluates to False, this parameter will be set to True.

Boolean

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics