0

Working in ArcGIS Pro 3.1.2 and trying to use Attribute Rules to restrict the values in a couple numeric fields. The ESRI documentation does not specify how this might be answered, despite my best effort: https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/attribute-rule-script-expression.htm

I'm collecting geologic data where the Azimuth field (numeric) needs to be restricted to 0-359 and the Inclination field (numeric) to 0-90.

All I need is an Arcade expression to do so.

2

1 Answer 1

2

Try creating an Attribute Constraint Rule for each field, and use the following Arcade expressions:

For Azimuth field

return ($feature.Azimuth >= 0 && $feature.Azimuth <= 359);

and for Inclination field

return ($feature. Inclination >= 0 && $feature.Inclination <= 90);

Set triggers to Insert and Update, and add an error message.

enter image description here

This will pop up an error message when you try to add a value outside the permitted range.

enter image description here

Note: My ArcGIS Pro required me to add a GlobalID field to my feature class for the rules to save.

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.