Use the validate operation

When using geoprocessing tools in ArcGIS Pro, you may see validation messages, or notice a change in whether a parameter is visible, or a change in the list of options for certain parameters, among other behaviors. This interactive experience is also available in web tools and geoprocessing services published from ArcGIS Pro 3.6 to ArcGIS Enterprise 12.0 using the validate operation.

Unlike the execute and submitJob operations, which provide one opportunity to provide all the input parameters to run a web tool or geoprocessing service, the validate operation lets you check and adjust your inputs multiple times before running a web tool or geoprocessing service using the execute or submitJob operations.

Requirements to use the validate operation

To use the validate operation, or to get the desired interactive behavior when using a published web tool or geoprocessing service, the tool must have validation logic and the validation capability must be enabled.

Use tools with existing validation logic

Many tools in ArcGIS Pro have validation logic. For example, when providing a feature class or table to an input parameter, a dependent field parameter automatically populates all the fields from that layer. Another example is when specifying certain options in one parameter, other parameters may become visible or hidden.

Author tools with customized validation logic

If the default validation logic is insufficient, use customized validation code using Python script tools or a Python toolbox.

Enable the validation capability

To support validation when publishing a tool from ArcGIS Pro, enable the Validate parameter in the web tool settings.

When using the GeoprocessingSharingDraft class to publish in Python, ensure that the capabilities property uses the Validate option.

Use a compatible client

Use a web tool or geoprocessing service from ArcGIS Pro 3.6 or later, or create a custom web app to use the validate operation.

Use validate in ArcGIS Pro

To validate an input before running a web tool or a geoprocessing service, click the Validate button left to the Run button. You can do the following depending on the validation logic of the tool:

  • Change the acceptable values of a parameter.
  • Update a field list based on a dependent feature or table input. This is also available for earlier releases.
  • Customize parameter messages.
  • Disable or enable parameters.
  • Change values for input types other than feature, table, and raster data types.

Unlike running a local tool, validation for web tools or geoprocessing services do not run automatically when you click away or your mouse unfocus after providing a value for a parameter.

Use validate with ArcGIS REST API

To customize a web app using ArcGIS REST API, see the Validate operation.