Introduction to Attribute Rules using examples for parcel fabrics

1691
3
06-25-2020 01:05 AM
Labels (1)
AmirBar-Maor
Esri Regular Contributor

Attribute rules enhance the editing experience and improve data integrity for geodatabase datasets. They are user-defined rules that can be used to automatically populate attributes, restrict invalid edits during edit operations, and perform quality assurance checks on existing features.
In this session, we'll introduce you to the Attribute Rules framework and provide relevant examples for parcels.
The Attribute Rules framework uses the Arcade expression language.

Presentation slides with links: Introduction to Attribute Rules using examples for parcel fabrics 

3 Replies
MikeZummo
New Contributor III

Hi Amir,

  I keep getting an error when I try to apply the record name rule you showed in your demo:

00217: Invalid Acrade expression, Arcade error: Unexpected null, Script line: 2

I've checked my Records and none have null Names. I am wondering if the FeatureSetByRelationshipName function does not work in a file geodatabase? If that is the case, can you suggest a possible alternative way to use an attribute rule to populate the record name if my fabric is in a file geodatabase?

var RecordName = First(FeatureSetByRelationshipName($feature, 'RecordHasLand', ['Name'], false));
Return RecordName.Name;

Thanks,

Mike Z

 

0 Kudos
TimHodson
Esri Contributor

Hi Mike,

It looks like you need to check for nulls:

var RecFeatRow = First(FeatureSetByRelationshipName($feature, 'RecordHasLand',['Name'], false));
if (RecFeatRow != null) {return  RecFeatRow.Name;}
MikeZummo
New Contributor III

HI Tim, 

    That fixed it! Thanks for the quick response on this.

Mike

0 Kudos