Hi,
I am trying to figure out a way where you can take information from a point layer, and have it appear in a pop-up of a polygon layer.
For example, I have a property that consists of a building, a basketball court, two tennis courts, and a soccer field. I want to be able to click the polygon and have the pop-up tell me that I have those point features within the polygon.
Can this be easily done via expressions when you configure the pop-up? If this can be done solely on AGOL that would be great, but I have access to Pro as well.
Thanks!
Solved! Go to Solution.
I'll give an example of one of the fields in my current project that I am doing this with. This should return a list of all features from the intersect layer (with the field you specify) that intersect with your polygon layer.
var intersectLayer =Intersects(FeatureSetByName($map,"Layer you want results for"), $feature)
var results = [];
for (var f in intersectLayer){
results[Count(results)] = f.FIELDYOUWANT;
}return Concatenate(results, ", ");
This can be done with arcade expressions.
This page should be helpful https://community.esri.com/community/gis/web-gis/arcgisonline/blog/2018/12/10/overlapping-features-i...
Hi Kellie,
This worked, and was straight forward!
So I was able to return one of the values, but the relationship is one to many, for example I was only able to return 1 of the sports, is there a way for it to return every single sport, each in its own line item?
Thanks again!
I'll give an example of one of the fields in my current project that I am doing this with. This should return a list of all features from the intersect layer (with the field you specify) that intersect with your polygon layer.
var intersectLayer =Intersects(FeatureSetByName($map,"Layer you want results for"), $feature)
var results = [];
for (var f in intersectLayer){
results[Count(results)] = f.FIELDYOUWANT;
}return Concatenate(results, ", ");
This is amazing, you are amazing. Thank you so much!
I actually have another, just random, question. Just popped up in my head and thought it might be cool.
Is there a way to list the features out, and if there are multiple that are the same, list it and have a count next to it?
For example listing them out like this:
Feature A (5)
Feature B (2)
Feature C (4)
Feature D (1)