Attribute Rule Validation

Since version: 1.5

With the Attribute Rule Validation profile, expressions can be written to evaluate whether or not a feature meets the criteria defined in the expression. This profile is used for validation attribute rules in ArcGIS Pro. The script should return a Boolean with true indicating the feature meets the validation criteria or false indicating it does not meet the criteria.


The following products implement this profile:

Spatial reference

The spatial reference of the expression's data source1 determines the execution context's spatial reference.

Time zone

The time zone of the expression's data source1 determines the execution context's default time zone.

Profile variables

Variable NameTypeDescriptionSince version
$datastoreFeatureSetCollectionA collection of layers in the same feature service or database as the $feature executing the script.1.5
$featureFeatureThe feature being evaluated for the constraint.1.5
$featureSetFeatureSetA collection of features in the same table as the $feature evaluating the expression.1.13

Function bundles

Core | Geometry | Data Access

Return types

Boolean | Dictionary

For a list of valid dictionary keywords, click here.


The following example is a validation rule created on a poles feature class to ensure that when the structureheight is 65 feet or greater, the material must be made of steel. An error feature is generated if this is not true.

Use dark colors for code blocksCopy
if ($feature.structureheight >= 65)
    If (DomainName($feature, 'Material') == 'Steel')
    { return true; }
    { return false; }
{  return true; }
  1. Data source can be a file geodatabase, mobile geodatabase, or mobile service.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.