Select to view content in your preferred language

Using Attribute Rules With Joined Tables To Pass Attribute Based On Intersecting Feature

1250
2
12-11-2020 10:06 AM
SterlingLoetz
Regular Contributor

I have a question about using Attribute Rules (AR) to trigger an attribute calculation based on an intersecting polygon feature that has a joined table within ArcGIS Pro. Is there a way to use AR with joined tables? I know this can work with related records, however my question pertains specifically to joined tables in Pro. I must preface this post by saying I am very much a beginner with Arcade & AR. 

Success Thus Far: I am working with a point layer and a parcel layer. When a point feature is created inside a polygon parcel, the parcel number is passed from the parcel polygon layer to a parcel number field in the point feature class. This works great and below is my successful Arcade expression for the AR.

Working Expression.PNGWorking Expression.PNG

Current Challenge: I have a standalone table residing in the same geodatabase that house the point and parcel feature classes. The table is called "parcelview_copy". This table contains additional information about parcels and I have joined this table to the parcel polygon feature class within Pro. I want to pass a different PIN field, "ADCO_PIN" to the point feature class when a point is created within a parcel. I get this error in the Arcade expression below.

Error Expression.PNGError Expression.PNG

I'm not really sure what I'm doing wrong or if joined tables are supported by AR?

Thanks for the help!

0 Kudos
2 Replies
JohannesLindner
MVP Alum

What you are trying is not possible in this form.

Attribute Rules work on the database level, while joins only work in a map. The original tables don't have these joins, hence your rule can't find the specified field.

Assuming you have a relationship between Parcel_Copy_Test and Parcelview_Copy based on PIN:

var parcels = FeatureSetByName($datastore, "Parcel_Copy_Test", ["PIN"], true)
var first_intersected_parcel = First(Intersects(parcels, $feature))
var pin = first_intersected_parcel.PIN
var parcelviews = FeatureSetByName($datastore, "Parcelview_Copy", ["PIN", "ADCO_PIN"])
var adco_pin = First(Filter(parcelviews, "PIN = @pin")).ADCO_PIN
return adco_pin

 


Have a great day!
Johannes
SterlingLoetz
Regular Contributor
0 Kudos