After adding attribute rules to the data, the evaluation process reviews the rules on the data to ensure rules are followed. The evaluation method used depends on the rule type and properties. Immediate evaluation rules are evaluated immediately during an edit operation, while deferred evaluation rules are evaluated at a specified time as follows:
- Immediate evaluation
- Immediate calculation rules
- Constraint rules
- Deferred evaluation
- Batch calculation rules
- Validation rules
Edits made by the Update Subnetwork or Update Is Connected tools in a utility network may bypass geodatabase behavior and will not prompt the immediate evaluation of attribute rules. See Update subnetworks and Identify isolated features for more information.
Immediate evaluation during editing
Immediate calculation and constraint rules are automatically evaluated with edit operations such as insert, update, or delete. The specific edit operation that prompts evaluation is defined in triggering events of the rule properties. To review the rule properties, see Create and manage attribute rules.
When you edit data in ArcGIS Pro or through a feature service, these rules are evaluated. Calculation rules either automatically populate fields or return an error message when the calculation expression fails. Constraint rules return an error message for rule violations. As edits are made, immediate calculation rules are evaluated first, followed by constraint rules. Any default values are set on features before evaluating these rules.
Exclude from application evaluation
Immediate calculation and constraint rules have an Exclude from application evaluation option in the rule properties that affects evaluation during editing. When the Exclude from application evaluation option is disabled, the rule will evaluate locally before the apply edit request is sent to the data source, which is ArcGIS Enterprise when editing a feature service or the geodatabase when directly editing the feature class or table. ArcGIS Pro is the only application that is capable of evaluating rules locally.
If you don't want a rule to be evaluated until all your edits are made and not as each edit is made, enable this option to avoid ArcGIS Pro from evaluating rules locally.
Note:The Exclude from application evaluation option must be true for immediate calculation rules if the Arcade expression returns specific attribute rule dictionary keywords, uses sequences, or when the field value is used in the calculation.
Batch calculation and validation rules are evaluated at a user-specified time using the Error Inspector view or the Evaluate Rules tool. During evaluation, a batch calculation rule will automatically populate fields or create error features when calculation expressions fail, and a validation rule will create error features that highlight features violating rules. If both rule types are evaluated simultaneously, the batch calculation rules are evaluated first, followed by the validation rules. Error features for these rules can be reviewed through the Error Inspector.
Note:The input workspace for evaluating batch calculation and validation rules depends on the type of geodatabase the dataset with attribute rules is stored in:
- File or mobile geodatabases—A geodatabase is the input workspace to evaluate.
- Enterprise geodatabases—A feature service with the Validation capability is the input workspace to evaluate. If the same dataset is published to multiple services, be aware that the error layers and validation status attribute are shared for the default version.
Validation Status attribute
The evaluation of batch calculation and validation rules is tracked by the Validation Status field in the dataset. The Validation Status field is added when the first batch calculation or validation rule is created for the dataset.
The field reports the following information for each feature:
- Does the feature require calculation?
- Does the feature require validation?
- Does the feature have errors?
The validation status for a feature must be set to calculation required or validation required for the evaluation to review the rules on the feature.
The Validation Status field is updated when the feature is edited and during evaluation. When a batch calculation or validation rule is added or modified for a dataset, the validation status attribute values are reset for all rows. (This applies to all versions for enterprise geodatabases.) When a dataset is migrated to another location, the validation status attribute is reset for the output dataset that is created.
See the following examples:
- When adding only validation rules to a dataset, the validation status is updated to 2: No calculation required, validation required, no error.
- When adding only batch calculation rules to a dataset, the validation status is updated to 4: Calculation required, no validation required, no error.
- When adding a batch calculation and validation rule to a dataset, the validation status is updated to 6:Calculation required, validation required, no error.
No calculation required, no validation required, no error
No calculation required, no validation required, has error(s)
No calculation required, validation required, no error
No calculation required, validation required, has error(s)
Calculation required, no validation required, no error
Calculation required, no validation required, has error(s)
Calculation required, validation required, no error
Calculation required, validation required, has error(s)
To evaluate batch calculation and validation rules with the Error Inspector, you must add the attribute rule error layers to the map. Use the layer's context menu Add Error Layers option to add a group layer of the error datasets from the geodatabase or feature service.
The error layers group layer is composed of the following datasets:
The Add Error Layers option is available after creating these rules in the geodatabase or sharing the four error datasets as part of a web feature layer that has Validation capabilities enabled. The error layers group layer is used as the source in the Error Inspector to evaluate rules and review error features.
The error datasets are created when the first batch calculation or validation rule is created in a geodatabase. These are used to store all errors created during rule evaluation.
Note:The error datasets that store the spatial errors are created with the WGS84 spatial reference.
Evaluate rules using the Error Inspector
You can evaluate batch calculation and validation rules using the Error Inspector in ArcGIS Pro. The source for the Error Inspector must be the error layers from a geodatabase or a feature service with the Validation capability.
- On the Insert tab, in the Project group, click New Map .
- On the Map tab, in the Layer group, click Add Data. Browse to the data source and select the feature classes or tables to evaluate. Click OK.
- For data shared as a feature service with the Validation capability, the data source is under Portal .
- For data in a geodatabase, the data source is under Project or Computer.
- In the Contents pane, right-click the layer, and click Add Error Layers .
The associated error layers are added as a single group layer, which will be used to evaluate rules in the Error Inspector.
- On the Edit tab, in the Manage Edits group, click Error Inspector .
On the Error Inspector toolbar, the Source option references the error layers in the map view.
- Optionally, click the Source drop-down button and choose the error layer to change the value.
- On the Evaluate Rules button , click the drop-down arrow to expand the options for evaluating rules.
- For Rule Type, choose at least one to evaluate.
- Batch Calculation Rules
- Validation Rules
- For Extent, choose one of the options:
- Visible extent—Evaluate the visible extent of the map.
- Full extent—If the source is a feature service, evaluate the full extent of the feature service. If the source is a geodatabase, evaluate the full extent of the data with attribute rules in the workspace.
- For Options, choose any of the following:
- Modified in this version—Evaluate edits made in the current branch version. This option is only available when the source is a feature service with the Version Management capability and connected to a branch version. This option is not available when evaluating rules using the default version.
- Execute asynchronously—Run the evaluate rules on the service asynchronously. This uses the system ValidationTools geoprocessing service, which allows for long-running processes. This option is only available when the source is a feature service with the Validation capability.
- For Rule Type, choose at least one to evaluate.
- When you're finished, click the drop-down button to collapse the options.
- Click the Evaluate Rules button .
Error features are created and displayed in the Error Inspector. To view and manage errors, see Manage attribute rule errors.