Attribute Rule Needed For Updating Related Records Tables

264
0
05-12-2021 06:39 AM
Labels (2)
JRJackson
New Contributor

In ArcGIS Pro 2.7.3, I have tried to create an insert and update trigger in attribute rules to insert or update a value in a field based on the value in another field from a related table.  This is an enterprise GIS environment.

What I have tried, and is not working, is this:

//Insert or Update - Assessment RimInvert = Connections RimInvert

var AssessRimInvert =  Max(FeatureSetByRelationshipName($feature,"conditionassessment"), 'RimInvert')

var ConnRimInvert = Number(AssessRimInvert)

if (AssessRimInvert == null)

    return {"errorMessage": "Condition Assessment should have RimInvert value."}

else

    return AssessRimInvert

 

I’m wanting to use the field value "RimInvert" in the “conditionassesment” table to populate a field in a related table called “connections” when a new connection record is created from and related to "conditionassessment" (or on updates).  The "connections" table was used to create the attribute rule settings as shown below.

Expression shows valid, but values in the "connections" field are not populating when a new record is created. Can someone please recommend changes to the expression that might work?

Attribute Rule settings:

JRJackson_1-1620826362320.png

 

Thanks for any help in advance.

0 Kudos
0 Replies