Need help with Arcade Expression in attribute rule that will grab a field value from another feature based on related fields

453
2
Jump to solution
03-17-2023 07:05 AM
GarySpenst
New Contributor II

Hello,

I need help with Arcade expression. I have polygon layer and point layer that are related based on these fields: (Flush_number_trigger=Flush_number_trigger). Relationship is 1:1. In the polygon table, I'd like to return startvalve field value from related point layer Thank you in advance!

This is what I thought would work, but the startvalve value is not coming across.

Var FlushStart= featuresetbyname($datastore,'WAT_UnidirectionalFlushStarts',['startvalve','Flush_number_trigger'])


Var ref_flush=$feature.Flush_Number_trigger
Var Flushstart_filter= filter(FlushStart,"Flush_number_trigger=@Ref_Flush")


if(count(Flushstart_filter)>0){
return First(Flushstart_filter).StartValve
}
return Null

 

0 Kudos
1 Solution

Accepted Solutions
2 Replies
DougMerrick
New Contributor III
0 Kudos
GarySpenst
New Contributor II

Thank you for the help!

0 Kudos