Hello,
I have an Arcade script that inserts the name of a boundary polygon if it intersects with the feature. How do I show a comma between only the ones where it intersects multiple polygons? My current code just adds a "," to everyone regardless if it's only one value.
var land = FeatureSetByName($datastore,"Boundary_Aug2024",["Name"], true)
var intersectLayer = Intersects(land, Geometry($feature))
var result = '';
if (Count(intersectLayer) > 0) {
for (var layer in intersectLayer) {
result += layer.Name+(", ") ;
}
} else {
result = "Null"
}
return result