I tried to count the number of points (call it incident layer) when I click on a polygon layer (call it administrative_bound layer) and display it on the pop-up.
I have 2 layers, separate map service layers. I am using Arcgis enterprise Standard bought on 2023 (version 11.0 I think).
I have read here and there, none worked:
https://support.esri.com/en-us/knowledge-base/how-to-display-a-count-of-different-point-features-in-a-000029218
https://www.reddit.com/r/gis/comments/1c7b0ah/featuresetbyname/
https://developers.arcgis.com/arcade/function-reference/featureset_functions/#filter
https://support.vertigis.com/hc/de/community/posts/11498023882642-How-to-use-Arcade-Expressions
For the start, I cant even declare a variable, for example:
var Point1 = FeaturesetByName($map, 'incident')
The error is: Execution Error:Runtime Error: Identifier Not Found. $map
I also try: FeatureSetById.. does not work too ! The same error comes up.
Please help.. thanks