Attribute rules are defined by the data author to enhance the editing experience and improve data integrity for geodatabase
When editing a dataset with attribute rules, no additional code is required to leverage rule evaluation in your app. Any add, update, or delete feature operation may trigger rule evaluation depending on how the data author 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 turned off, each time you edit a feature from one of the supported feature tables, the attribution rule is evaluated locally in your app.
If the rule's Exclude from application evaluation is enabled, the attribution rule is not be evaluated in your app but on the feature service, or data source, when ServiceGeodatabase.applyEdits() is called or when the SyncGeodatabaseJob completes. Edits made by the feature service 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, updates in the replica version are available for download to your app after 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 are evaluated no matter the Exclude from application evaluation value. In this instance, the stand-alone Geodatabase, unlike a sync-enabled mobile geodatabase that is a client to a backend feature service, is operating as the data source.