Skip To Content

Evaluate attribute rules

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. Rules can be evaluated immediately during an edit operation or evaluated at a specified time using the validation service as follows:

  • Immediate evaluation
    • Immediate calculation rules
    • Constraint rules
  • Deferred evaluation
    • Batch calculation rules
    • Validation rules

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 Attribute Rules view.

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 prior to evaluating these rules.

Immediate calculation and constraint rules have a Server Only option in the rule properties that affects evaluation during feature service editing. If you're editing the feature service in ArcGIS Pro, you can uncheck the Server Only option when you create rules, and the rules will evaluate locally before apply edit requests are sent to the server.

The following are considerations when using this option for immediate calculation rules:

  • The Server Only option must be true if the Arcade expression returns a dictionary using the calculationRequired or validationRequired keyword.
  • When using sequences in the script expression, only use insert triggering events. If you're specifying update triggering events, ensure that the Server Only option is set to true for the rule.

Deferred evaluation using the validation service

Batch calculation and validation rules are evaluated at a user-specified time using the Error Inspector or the Evaluate Rules tool. Once the validation service is available, you choose when to evaluate the rules, which will review the rules for the existing set of data.

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 Validation capability used to evaluate batch calculation and validation rules is only available when sharing to ArcGIS Enterprise 10.7 or later. See Considerations when sharing to older portals for more information.

See Share datasets with attribute rules for more information.

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?

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 can only be updated through evaluation.

CodeDescription

0

No calculation required, no validation required, no error

1

No calculation required, no validation required, has error(s)

2

No calculation required, validation required, no error

3

No calculation required, validation required, has error(s)

4

Calculation required, no validation required, no error

5

Calculation required, no validation required, has error(s)

6

Calculation required, validation required, no error

7

Calculation required, validation required, has error(s)

Coded Value Domain of the Validation Status attribute.

Error layers

To evaluate batch calculation and validation rules with the Error Inspector, use the Add Error Layers option to add layers to your map. This adds a group layer of the error datasets from the feature service.

The error layers group layer is comprised of the following datasets:

  • GDB_ValidationPointErrors
  • GDB_ValidationLineErrors
  • GDB_ValidationPolygonErrors
  • GDB_ValidationObjectErrors

The Add Error Layers option is only available after 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. To learn more, see Share datasets with attribute rules.

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 features created during rule evaluation. To remove an error feature, make edits to correct the error, and re-evaluate the rule.

See the following sections to learn more about how to evaluate rules using the Error Inspector and how to view details about an error.

Evaluate rules using the Error Inspector

You can evaluate batch calculation and validation rules using the Error Inspector in ArcGIS Pro. Prior to completing the steps below, the datasets and associated error datasets must be shared as a web feature layers with Validation capabilities.

  1. In the Catalog pane, click the Portal tab.
  2. Locate and double-click the web feature layer containing the data to evaluate.
  3. Right-click the individual layer or layers and click Add to New > Map Add Map or Add to Current Map Add To Current Map.
  4. In the Contents pane, right-click the layer, and click Add Error Layers Group layer.

    The associated error layers are added as a single group layer, which will be used to evaluate rules in the Error Inspector.

  5. On the Edit tab, in the Manage Edits group, click Error Inspector Error Inspector.

    On the Error Inspector toolbar, the Source option references the error layer in the map view.

  6. Optionally click the Source drop-down button and choose the error layer to change the value.
  7. On the Evaluate Rules button Validate Extent, click the drop-down button Drop-down button to expand the options for evaluating rules.
    1. For Rule Type, chose at least one to evaluate.

      • Batch Calculation Rules
      • Validation Rules

    2. For Extent, chose one of the options.

      • Visible extent—Evaluate the visible extent of the map.
      • Full extent—Evaluate the full extent of the feature service.

    3. For Options, chose any of the following:
      • Modified in this branch—Evaluate edits made in the current branch version.
      • Execute asynchronously—Execute the evaluate rules on the service asynchronously. This uses the system ValidationTools geoprocessing service, which allows for long-running processes.
  8. When you're finished, click the drop-down button Drop-down button to collapse the options.
  9. Click the Evaluate Rules button Validate Extent.
  10. Error features are created and displayed in the Error Inspector.

View details about an error

The Details tab displays information about each error.

  1. In the Catalog pane, click the Portal tab.
  2. Locate and double-click the web feature layer containing the data to evaluate.
  3. Right-click the individual layer or layers and click Add to New > Map Add Map or Add to Current Map Add To Current Map.
  4. In the Contents pane, right-click the layer and click Add Error Layers Group layer.

    The associated error layers are added as a single group layer, which will be used to review errors in the Error Inspector.

  5. On the Edit tab, in the Manage Edits group, click Error Inspector Error Inspector.
  6. On the Error Inspector toolbar, click the Source drop-down menu and choose the error layer.

    The error features are displayed with their attributes in the grid. The columns can be used to sort error features, and the errors can be filtered.

  7. In the error table, select an error by clicking the gray square next to the shape field.
  8. Click the Details tab.
  9. Information about the error feature appears on the Details tab. You can also use the Attribute Rules view to view the details of the rule associated with the error feature.