Support Resource
Validation rules specify permissible attribute configurations and general relationships on a feature. They are used to check features in a dataset based on a specific requirement or constraint.
The rule evaluation occurs for existing features at a user-specified time, and if rules are violated, error features are created. This process allows you to perform quality assurance checks on features and review areas of concern as an iterative process.
Ready-to-use rules exist to validate the uniqueness of a record based on multiple fields. See the ArcGIS Pro document: Unique Field Value. However the uniqueness is checked for each field individually.
Users may have the requirement to validate the uniqueness of a record based on a combined list of values from different fields.
Use the following Arcade expression in the attribute validation rule to validate the uniqueness of a record based on the combined value of three different fields:
var value1 = $feature.field1
var value2 = $feature.field2
var value3 = $feature.field3
var currentObjectId = $feature.OBJECTID
var fs = FeatureSetByName($datastore, "field1")
var fsResult = filter(fs, "field1= @value1 and field2= @value2 and field3= @value3 and OBJECTID <> @currentObjectId")
if (first(fsResult) == null)
return true; //we did not find a duplicate
else
return false; //we did find a duplicate create an error feature
Article ID: 000033996
Get help from ArcGIS experts
Download the Esri Support App