If Value Is (ModelBuilder)

Summary

Evaluates an input value against a single value, a list of values, or a range of values using a defined comparison operator.

Learn how If Value 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.

  • Note:

    Most tools in ArcGIS are empty (without color) when added to a model; however, the If Value Is, If Data Exists, Collect Values, and Merge Branch tools are not. Unlike most tools, the If Value Is tool is always in a ready-to-run state (with color). This is because the input to the tool can be empty, which is considered a valid input for the comparison.

Syntax

ValueIsIfThenElse({input_value}, {value_test}, {comparison_type}, {values}, {range_values}, {comparison_value})
ParameterExplanationData Type
input_value
(Optional)

The input value to evaluate.

Any Value
value_test
(Optional)

The type of comparison operator to use.

  • IS_EQUAL_TO_ANYEvaluate if the input value is equal to any one of the comparison values. This is the default.
  • IS_NOT_EQUAL_TO_ANYEvaluate if the input value is not equal to any one of the comparison values.
  • IS_NOT_EQUAL_TO_ALLEvaluate if the input value is not equal to every comparison value.
  • IS_BETWEEN_ANYEvaluate if the input value is between any one range of comparison values.
  • IS_NOT_BETWEEN_ANY Evaluate if the input value is not between any range of comparison values.
  • IS_LESS_THANEvaluate if the input value is less than the comparison value.
  • IS_GREATER_THANEvaluate if the input value is greater than the comparison value.
  • IS_LESS_THAN_OR_EQUALEvaluate if the input value is less than or equal to the comparison value.
  • IS_GREATER_THAN_OR_EQUALEvaluate if the input value is greater than or equal to the comparison value.
  • IS_EMPTYEvaluate if the input value is empty.
String
comparison_type
(Optional)

The type of data comparison to use.

  • STRING_CASE_INSENSITIVEThe input value is compared to the comparison values as a case insensitive string. This is the default.
  • STRING_CASE_SENSITIVEThe input value is compared to the comparison values as a case sensitive string.
  • LONGThe input numeric value is compared to the comparison values as a Long type.
  • DOUBLE The input numeric value is compared to the comparison values as a Double type.
  • AUTOChecks the input data type and performs an equivalent data type comparison. For example, a comparison between input and comparison values uses string comparison for string type, long for long, and double for double. All other input data types use the default string comparison method.
String
values
[values,...]
(Optional)

The list of values to compare to the input value.

Any Values
range_values
[[Any Value, Any Value],...]
(Optional)

The list of range values to compare to the input value.

  • Minimum—The minimum value in the range.
  • Maximum—The maximum value in the range.
Value Table
comparison_value
(Optional)

The single value to compare to the input value.

Any Value

Derived Output

NameExplanationData 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