Scenario:
We have a coded value domain on a field. A user overrides the domain by using the field calculator or some other method. Now, there are invalid values in that field.
Idea:
Give us an optional setting in the table properties to "hard enforce" domains. (The setting could be disabled by default to avoid causing confusion in existing workflows.) All ArcGIS functionality/applications would be designed to honor the domain and prevent invalid values from being entered.
I’m aware similar functionality can be achieved via customization using attribute rules or database triggers. But we shouldn't need to write custom code to enforce a pick list. Most enterprise systems have hard domains built in as a way of enforcing basic data integrity. For example, in IBM Maximo, the entire system honors domains by default — including back-end Python scripts. As a result, data integrity is rock solid, making data analysis easy.
Could that same functionality be added to ArcGIS across the board, including GP tools?
FYI @Bud Attributes pane editing has functionality for finding and preventing invalid attributes, including invalid domains.
See these help pages for more information:
https://pro.arcgis.com/en/pro-app/latest/help/editing/edit-feature-attributes.htm#ESRI_SECTION1_8F13...
https://pro.arcgis.com/en/pro-app/latest/help/editing/change-general-editing-tool-settings.htm
It sounds like your idea might be more specific to Geoprocessing, so I updated the label to reflect that.
@Bud we have this idea on the books and are tracking it in terms of the geoprocessing tool UI https://community.esri.com/t5/arcgis-pro-ideas/field-calculator-should-honor-domains/idi-p/928220
After some internal discussion, if the intent is to block writing any value outside of a domain to the database, that could be set up using constraint attribute rules: https://pro.arcgis.com/en/pro-app/latest/help/data/geodatabases/overview/constraint-attribute-rules....
Note that the Calculate Field gp tool does have an Enforce Domains parameter, but it is off by default because it is an expensive operation in terms of performance and is a different pattern than what users may have been used to. So the idea I pointed to is about providing the domain picklist in the tool's UI.
Thanks Kory.
And @Scott_Harris, regarding this link:
Find and correct invalid values
To find and correct invalid attribute values, right-click the layer in the selection view and click Select Only Invalid Objects Select Only Invalid Objects. This command is available with layers for which a data rule exists including attribute rules and other geodatabase behaviors such as attribute domains.
That looks helpful. Thanks.
For my notes, that functionality doesn't seem to be available in ArcGIS Pro 2.6.8:
https://pro.arcgis.com/en/pro-app/2.6/help/editing/edit-feature-attributes.htm
@Bud The functionality was added at 2.6.
Try this:
@Scott_Harris Thanks. As you might have guessed, I was looking at the Attributes Table (incorrect), not the Attributes Pane (correct).
For what it's worth, that technique worked fine on a feature class, but I couldn't get it to work for a non-spatial table. I'm not sure why. I deliberately entered an invalid domain value (via the field calculator), but the "Select Only Invalid Objects" functionality didn't select that record (or any other invalid domain records).
Does it work for you when used on a non-spatial table in a newer version of Pro?
@Bud 2.8 and higher allow the command to work with standalone tables
Would be nice if this worked for hosted feature layers.
R_
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.