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.
Context
The following products implement this profile:
- ArcGIS Pro
- ArcGIS Enterprise
- ArcGIS Maps SDKs for Native Apps
Spatial reference
The spatial reference of the layer from which $feature
originates determines the spatial reference of the expression's execution context.
Profile variables
Variable Name | Type | Description | Since version |
---|---|---|---|
$datastore | FeatureSetCollection | A collection of layers in the same feature service or database as the $feature executing the script. | 1.5 |
$editcontext.editType | Text | Indicates whether the edit event is INSERT , UPDATE , DELETE , or NA (not applicable). | 1.10 |
$feature | Feature | The feature being evaluated for the constraint. | 1.5 |
$originalFeature | Feature | The previous state of the feature being evaluated. | 1.9 |
$featureSet | FeatureSet | A collection of features in the same table as the $feature evaluating the expression. | 1.13 |
Function bundles
Core | Geometry | Data Access
Return types
For a list of valid dictionary keywords, click here.
Example
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.