Intersect arcade expressions for calculating fields and symbology based on intersects between two layers

294
2
01-06-2021 10:43 AM
Labels (1)
DataOfficer
Occasional Contributor III

Is there any way to calculate the field of an attribute table, or symbology based on an arcade expression for the intersect of two layers? A point layer and a polygon layer in this instance.

I am able to use an Intersects expression in a popup, e.g.:

// get the count for all sites in the grid

var sites = FeatureSetByName($map,"Sites")

var countSites = Count(Intersects(sites,$feature))

return countSites

 However the expressions available to calculate an attribute table field or symbology do not accept $map during the use of the FeatureSetByName function, giving the following error:

Execution Error:Runtime Error: Identifier Not Found. $map

Are there plans for this functionality to be supported in future?

2 Replies
XanderBakker
Esri Esteemed Contributor

Hi @DataOfficer ,

 

Q: Is there any way to calculate the field of an attribute table based on an arcade expression for the intersect of two layers?

A: Yes, if the data is stored in the same datastore and you are using $datastore in the Arcade expression ($map is not supported in the Field Calculation profile)

 

Q: Is there any way to define the symbology based on an arcade expression for the intersect of two layers?

A: No, the symbology profile does not provide access to other features and featuresets. You can however, calculate a field based on other features and featuresets and define the symbology on that newly created field.

 

0 Kudos
DataOfficer
Occasional Contributor III

Hi @XanderBakker,
That's fantastic, thank you for the in-depth response. I will give it a try via the $datastore route.

0 Kudos