Skip To Content

If Field Exists

Summary

Evaluates if the input data has the specified fields.

Learn how If Field Exists 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

FieldExistsIfThenElse_mb (in_table, {field_test_type}, field)
ParameterExplanationData Type
in_table

Input table that will be evaluated for the existence of the specified fields.

Table View, Raster Layer, Mosaic Layer
field_test_type
(Optional)

The criteria to test the specified list of fields against.

  • MUST_HAVE_ALL_FIELDSAll fields must exists.
  • MUST_HAVE_AT_LEAST_ONE_FIELDMust have at least one of the specified fields.
  • MUST_NOT_HAVE_ALL_FIELDSMust not have any of the specified fields.
  • MUST_NOT_HAVE_AT_LEAST_ONE_FIELDMust not have at least one of the specified fields.
String
field
[field,...]

Field names to check for in the input table.

String

Environments

This tool does not use any geoprocessing environments.

Licensing information

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