Skip To Content

If Data Exists

Summary

Evaluates if the specified data exists.

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

  • If Data Exists is always in a ready-to-run state (colored in) when added to a model. This is because the input is an optional Any Value data type, and an empty value is considered as valid input and evaluated as false. If the data type does not match the real data type of the input data, the False output variable will be set to true.

Syntax

DataExistsIfThenElse_mb ({in_data}, {data_type})
ParameterExplanationData Type
in_data
(Optional)

Input data element to be evaluated.

Any Value
data_type
(Optional)

The data type of the data element being evaluated. The only time you need to provide a value is when a geodatabase contains a feature dataset and a feature class or table with the same name. In this case, you need to select the data type (feature dataset, feature class or table) of the item you want to evaluate.

  • ANYAny Value. This is the default.
  • FEATURE_DATASETFeature Dataset
  • FEATURE_CLASSFeature Class
  • TABLETable
  • VIEWView
  • RELATIONSHIP_CLASSRelationship Class
  • RASTER_DATASETRaster Dataset
  • MOSAIC_DATASETMosaic Dataset
  • TOOLBOXToolbox
  • TOPOLOGYTopology
String

Environments

This tool does not use any geoprocessing environments.

Licensing information

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