Select to view content in your preferred language

Help with Arcade expression to filter and intersect

357
1
06-21-2023 03:32 PM
Labels (2)
KaraG
by
Occasional Contributor

Hi, I am very new to Arcade and having trouble figuring out what is wrong with my expressions for a custom popup. I am trying to use one layer to populate the popup in another layer.

This expression worked fine: 

var group = FeatureSetById($map, "188df8c8bb8-layer-21")
var countgrp = Count(Intersects(group, $feature))
return countgrp
 

Now I'm trying to filter out by attributes and I keep getting errors. When I click run, it says Test Execution Error: Unknown error. Verify test data. I'm guessing something is wrong with the filter? Maybe the SQL portion? This is the code that is not working:

var deepreef = Filter(FeatureSetById($map, "188df8c8bb8-layer-21"), "group = 'Deep Reef'")
var countdeepreef = Count(Intersects(deepreef, $feature))
return countdeepreef
 
 
 
0 Kudos
1 Reply
KenBuja
MVP Esteemed Contributor

Is "group" a field name in that data layer?

0 Kudos