Overview
This lecture covers how to use attribute rules in ArcGIS Pro to ensure data integrity in an electric utility network, focusing on preventing and tracking irregular edits to peak load values and configuring informative pop-ups.
Preventing Peak Load Spikes with Constraint Attribute Rules
- Irregular edits in the Low Voltage Service peak load attribute highlighted the need for stricter data validation.
- ArcGIS Utility Network uses subtype group layers and attribute domains instead of many feature classes for efficiency.
- The peakload field lacks a domain because its values fluctuate often, making traditional data integrity tools ineffective.
- A constraint attribute rule using Arcade and the $originalFeature global prevents edits where peakload changes by more than 50 kW.
- To apply, add a constraint rule to the Low Voltage Service subtype; the expression fails edits with excessive value changes.
Testing the Constraint Rule
- Edits within a 50 kW change in peak load are allowed; edits exceeding 50 kW are blocked with an error message.
- The rule helps maintain data quality by preventing sudden, unrealistic data spikes.
Reporting Peak Load Spikes with a Calculation Rule
- A separate LoadHistory table is created to log changes in peak load for tracking and analysis.
- Editor tracking fields in LoadHistory record who made edits and when.
- A calculation attribute rule logs every change to the peakload field by adding a row in LoadHistory and storing both the new value and the service’s GUID.
Testing the Calculation Rule
- Edits to peak load for services automatically generate entries in LoadHistory, allowing monitoring of all value changes over time.
- The rule supports operational analysis and informed customer support.
Configuring a Pop-up to Display Load History
- Pop-ups for Low Voltage Service features use Arcade expressions to summarize load history.
- Expressions calculate and display the maximum, minimum, average, and count of peak load edits using LoadHistory data.
- These pop-ups help operations and customer service teams quickly assess service behavior.
Key Terms & Definitions
- Attribute Rule — User-defined logic in ArcGIS that automates data validation or calculation during edits.
- Constraint Attribute Rule — A rule that prohibits invalid attribute edits to enforce data integrity.
- Calculation Attribute Rule — A rule that automatically updates fields or logs changes when edits occur.
- Arcade — Scripting language used in ArcGIS for creating expressions and attribute rules.
- $originalFeature — An Arcade global variable representing a feature’s pre-edit state.
- LoadHistory Table — A table to log every change in peakload values, including editor and timestamp.
- Pop-up Expression — Arcade script used to summarize or extract data for display in map pop-ups.
Action Items / Next Steps
- Download and explore the Attribute Rules project package.
- Implement constraint and calculation attribute rules as demonstrated.
- Configure and test Arcade expressions for informative map pop-ups.
- Practice editing features and reviewing resulting logs and error messages.