I am doing the lab called "Building an App in ArcGIS Online to Expand Food Access" but I am stuck on the "Customize pop-ups with arcade" exercise at step 4.
What needs to be done is to create a list of retail stores that are both within a .75 mile radius and accept SNAP. This is done using two expressions. The first expression creates a radius variable using the buffer function. This is what I have, which is exactly what the lab example shows (with a different layer ID).
var retail_layer = FeatureSetById($map, "18d1d756020-layer-70")
var radius = Buffer($feature,.75,"miles")
var retail_count = Count(Intersects(retail_layer, radius))
return retail_count
The error comes back saying "Test execution error: Unknown Error. Verify test data."
I have the same issue with the second expression, which creates a loop. Again, what I have is exactly what the lab example shows (with a different layer ID):
var retail_layer = FeatureSetById($map, "18d1d756020-layer-70")
var radius = Buffer($feature,.75,"miles")
var nearby_stores = Intersects(retail_layer,radius)
var retail_list = ''
for(var k in nearby_stores){
retail_list += k.Store_Name + TextFormatting.NewLine
}
return retail_list
Any help would be greatly appreciated!