Hi,
I have the following Arcade expression that works in the field calculator (AGOL, Pro). It combines a spatial join and a calculation.
Basically, enrich a polygon with a distinct list of values from the points
var bcit_portal = Portal("https://bcitgis.maps.arcgis.com/");
var structs = FeatureSetByPortalItem(bcit_portal,"dfb1df67022c4822a52dda331fa49da2", 0, ['park_structure_simple'],true)
var structs_in = Contains($feature, structs);
Console(count(structs_in));
var struct_list = [];
for(var feat in structs_in){
if(!Includes(struct_list, feat.park_structure_simple))
{
Push(struct_list, feat.park_structure_simple);
} // end of already in the list
}
return Concatenate(struct_list, ':')
It could be that I am a data-pipeline-noob but I cannot get exactly the same thing.
I can generate a lot of "stacked polygons" but not one polygon per park with a distinct list of values representing the structure types within that park.
Any guidance would be appreciated.
Rob
Update, I found the summary fields option on the join but it seems to be only numeric fields.
I actually put some thought into it and tossed out a bunch of ideas and settle on the one below where you could add a custom Arcade expression for summarizing data to bring back one value.
Adding portal functions to the field calculator could slightly violate the visual presented in data pipelines.
However, if you could attached more than one input source to the calculator that might work.