Hi everyone,
I'm trying to use arcade to pull the address from 3 features. I want to pull the address into the related table iterating through the 3 features and pulling the first one found. The address will be pulled based on the global ID
Code:
Spoiler//create featuresSets for each Layer in the service
var p1 = FeatureSetByName($map,"parcel (LogTest )")
var p2 = FeatureSetByName($map,"building (LogTest )")
var p3 = FeatureSetByName($map,"facilities (LogTest)")
//Filter your FeatureSets by Site ID
var GUID = $feature.GLOBALID
var p1_filter = Filter(p1, "GUID = @$feature.GLOBALID")
var p2_filter = Filter(p2, "GUID = @$feature.GLOBALID")
var p3_filter = Filter(p3, "GUID = @$feature.GLOBALID")
//Return the address of the parent feature
if(Count(p1_filter) > 0) {
return First(p2_filter).Address
}
else if(Count(p2_filter) > 0) {
return First(p3_filter).Address
}
else if(Count(p3_filter) > 0) {
return First(p3_filter).Address
}
else{
return null;
}