I currently have a webmap that consists of two layers. One is a polygon layers which represents parcels, and the other is a points layer that represents issued permits. I would like for the AGOL popup to show a list of the permits issued for each parcel, but am unsure of the arcade statement. As of right now, I have this expression, but it fails to return results:
var intersectLayer =Intersects(FeatureSetByName($map,"Permits Issued"), $feature)
for (var f in intersectLayer){
return f.NAME
}
The permits layer is called "Permits Issued" in the web map. The field I would like to display in the popup is called "PermitType". Can anyone advise me on what I may be doing wrong? Thanks in advance.
Just to clarify, are you looking to find the total number of permits in each polygon, or to list the permits for each polygon?
The list of the permits. We issue about twenty different permits, so I am looking for a person to click the parcel and see every permit that has been issued. However, the total amount of permits would be a nice addition. Thanks.
The Arcade expression you have here will give the total number. I recently used the same expression for a viewer, and it works great!
As far as listing permits, that's unfortunately currently out of my realm of knowledge, however, I am working on researching that for a project I'm doing as well, so I will certainly share any info that I discover back here.