Attribute rules enhance the editing experience and improve data integrity for geodatabase
When editing a dataset with attribute rules, there is no additional code required to leverage rule evaluation in your app. Any add, update, or delete feature operation may trigger rule evaluation depending on how you've configured the rule.
Support for attribute rules
Attribute rules are supported in the following feature tables
- A
ServiceFeatureTableread directly from a web mapA web map is a map stored as a JSON object that defines properties such as the basemap layer, data layers, layer styles, and pop-up styles. Its JSON structure is defined by the web map specification. or web sceneA web scene is a scene stored as a JSON object that defines properties such as the basemap layer, data layers, layer styles, and pop-up styles. Its JSON structure is defined by the web scene specification. . - A
ServiceFeatureTablecreated directly from aServiceGeodatabaseby callingServiceGeodatabase.getTable(). - A sync-enabled mobile
Geodatabasedownloaded using theGeodatabaseSyncTaskorOfflineMapTask. ArcGIS Enterprise 11.4 or newer feature services are required to support the download of attribute rules. - A
Geodatabaseexported from ArcGIS ProArcGIS Pro is a professional desktop GIS application that can explore, visualize, analyze, and manage 2D and 3D data. and side loadedSideloading is the process of deploying a file or package to a device without using a network. onto the device.
Attribute rules are not supported in a ServiceFeatureTable created using any of its constructors. These stand-alone service feature tables lack the context of their parent geodatabase, which is required to evaluate attribute rules.
Attribute rule evaluation on the client
Using ArcGIS Pro
If the rule's Exclude from application evaluation is disabled, every time you edit a feature from one of the supported feature tables, the attribution rule will be evaluated locally in your app.
If the rule's Exclude from application evaluation is enabled, the attribution rule will not be evaluated in your app but they will be evaluated on the feature server, or data source, when ServiceGeodatabase.applyEditsAsync() is called or when SyncGeodatabaseJob completes. Edits made by the feature server due to rule execution are automatically reflected in your app if you use a ServiceGeodatabase or in the replica version of the sync-enabled Geodatabase. However, these updates in the replica version will only be available for download to your app once they have been reconciled and posted to the default branch version. For more information, see the Synchronize with a replica version documentation.
If your app is editing features from a stand-alone Geodatabase exported from ArcGIS Pro, all attribute rules will be evaluated. The stand-alone Geodatabase, unlike a sync-enabled mobile geodatabase that is only a client to a backend feature service, is operating as the data source so every attribute rule is evaluated even if its Exclude from application evaluation value is enabled.