Summary
Evaluates geodatabase rules and functionality that are managed by services.
Usage
When the input workspace is a file geodatabase, the entire workspace is evaluated.
When the input workspace is a feature service workspace, the Validation capability must be enabled.
The tool evaluates attribute rules for the Default version.
Syntax
arcpy.management.EvaluateRules(in_workspace, evaluation_types, {extent}, {run_async})
Parameter | Explanation | Data Type |
in_workspace | A file geodatabase or feature service URL. An example of a feature service URL is https://myserver/server/rest/services/myservicename/FeatureServer. | Workspace |
evaluation_types [evaluation_types,...] | Specifies the types of evaluation that will be used.
| String |
extent (Optional) | The extent to be evaluated. If there is a selection in the map, only selected features within the specified extent will be evaluated.
| Extent |
run_async (Optional) | Specifies whether the evaluation will run synchronously or asynchronously. This parameter is only supported when the input workspace is a feature service.
Legacy:In earlier releases, this parameter was named async. At ArcGIS Pro 2.4, the parameter name was changed to run_async to avoid conflicts with the reserved Python keyword async. | Boolean |
Derived Output
Name | Explanation | Data Type |
updated_workspace | The updated feature service workspace that has been evaluated. | Workspace |
Code sample
Evaluate validation rules asynchronously using the EvaluateRules tool.
# import arcpy
import arcpy
# assign local variables
in_workspace = "https://myserver/server/rest/services/myservicename/FeatureServer"
extent = "-113.187897827702 38.0958054854392 -113.142166008849 38.1404599940719"
# run the evaluation
arcpy.EvaluateRules_management(in_workspace, "VALIDATION_RULES", extent, "ASYNC")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes