I'm trying to multiple get address points that are within a parcel to show up in the parcel's pop-up window.
I got the Arcade assistant to generate some code in a simple map I made consisting of only a point and a polygon layer and it worked. When I transfer the code to a much more complicated map that I didn't create, (changing the name of the layer name and field name) I get a text execution error.
Here's the code that works:
// get addresses from RPP_Addresses layer from field 'addresses' that intersect with selected parcel
var addresses = Intersects(FeatureSetByName($map, "RPP_Addresses"), $feature);
var addressList = [];
for (var address in addresses) {
Push(addressList, address.FullAddres);
}
return Concatenate(addressList, ", ");
This code does not:
// get addresses from Addresses layer from field 'AddressLoo' that intersect with selected parcel
var addresses = Intersects(FeatureSetByName($map, "Addresses"), $feature);
var addressList = [];
for (var address in addresses) {
Push(addressList, address.AddressLoo);
}
return Concatenate(addressList, ", ");
This is the error message I get:
Test execution error: Compilation error - Line : 2, 44: Identifier not recognized. Verify test data.
In the bad code, the $map in Line 2, position 44 is underlined in red
Both point and polygon layers are in different layer groups and I can't seem to drag them out, but I can't imagine that would be the problem