Creating a custom list that can still filter the map view

222
0
09-16-2022 09:43 AM
Labels (1)
erikh
by
New Contributor

Hello,

I have a feature class that has three sub-layers. Each of the layers include identical attribute information, with 3 identical fields. The only difference is that one of the sub-layers is a point layer, one is a line layer, and the last is a polygon layer. I want to create a unified list on a Dashboard that can filter and zoom to the data on the map and includes the "Name" attribute from each of the three sub-layers.

So far, I am able to create three separate lists (points, lines, polygons) that filter and zoom as well as one unified list, but this list does not filter nor zoom as it is based on a new feature class that I created using Arcade to combine the other three. This is the code I used:

var portal = Portal("https://arcgis.com//");
var points = FeatureSetByPortalItem(portal,"c8921ecf75537253b07x8s8d72d034d3",0,["*"],false)
var lines = FeatureSetByPortalItem(portal,"c8921ecf75537253b07x8s8d72d034d3",1,["*"],false)
var areas = FeatureSetByPortalItem(portal,"c8921ecf75537253b07x8s8d72d034d3",2,["*"],false)

var combinedDict = {
fields: [
{ name: "Name", type: "esriFieldTypeString" },
{ name: "EndYear", type: "esriFieldTypeString" },
{ name: "Info", type: "esriFieldTypeString" },
],
geometryType: "",
features: [],
};

var i = 0;
for (var p in points) {
combinedDict.features[i++] = {
attributes: {
Name: p["Name"],
EndYear: p["EndYear"],
Info: p["Info"],
},
};
}

for (var l in lines) {
combinedDict.features[i++] = {
attributes: {
Name: l["Name"],
EndYear: l["EndYear"],
Info: l["Info"],
},
};
}

for (var a in areas) {
combinedDict.features[i++] = {
attributes: {
Name: a["Name"],
EndYear: a["EndYear"],
Info: a["Info"],
},
};
}

return FeatureSet(Text(combinedDict));

I have no idea what to try next, or if it is even possible to do this. I appreciate any help!

Tags (2)
0 Replies