Constraint attribute rules

Constraint rules specify permissible attribute configurations and general relationships on a feature. Unlike calculation rules, constraint rules are not used to populate attributes; they are used to ensure that specific conditions are met on a feature.

Constraint rules can be created by clicking the Constraint Rule button Constraint Rules in the Add Rules group of the Attribute Rules view. Rules can also be created using the Add Attribute Rule tool or the Import Attribute Rules tool.

Note:

The Ready to Use Rules Ready To Use Rules button provides access to a gallery of configurable checks that support creation of constraint and validation rules. This is available with an ArcGIS Data Reviewer license.

Learn more about how to create attribute rules using ArcGIS Data Reviewer

Constraint rules return a true or false result representing whether a rule is satisfied as follows:

  • True—The script expression provided is satisfied and the feature will be created.
  • False—The script expression provided is not satisfied and the feature will not be created.

To learn more, see Attribute rule script expression examples.

Constraint rules are evaluated immediately during edit operations for specific triggering events (insert, update, and delete) that are specified in the rule properties. If a constraint rule is violated, a user-defined error number and message are returned, and the feature edit is rolled back. The error number and message are specified during the creation of the rule. To find data inconsistencies of existing data, use validation rules.

Examples

The following are examples of how constraint attribute rules can be used in a geodatabase:

  • A feature string attribute value must be all uppercase.
  • A feature string attribute value must be a specified number of characters.
  • For a single-phase overhead transformer with a grounding attribute set to Delta, the following phase values are valid: AB, BC, AC. When grounding is set to Wye, the following phase values are valid: A, B, C.
  • A power pole taller than 65 feet can only be made of steel.

See the Arcade profile for the requirements and global variables to author attribute rule types. The Arcade Getting Started guide and Function Index are additional resources you can use to construct script expressions for attribute rules.

See specific examples of attribute rule script expressions


In this topic
  1. Examples