Hello, I have an Arcade expression put together for a Dashboard List, using FeatureSetByPortalItem to reference a Portal feature service. The purpose is to create a list that sorts tracts by the latest date in any of three date type fields. Because this is directly referencing the source feature service, and not the web map in the Dashboard, several Actions are unavailable, including 'Show Popup' and 'Zoom'.
Instead of using FeatureSetByPortalItem(<Portal>,<Portal Item ID>), is there a way to reference the layer from a web map, or otherwise define the popup so that can be displayed as an action?
Below is the Expression referencing the Portal feature service item and layer directly. I just can't use this to zoom or display a pop-up.
var portal = Portal(<portal>);
var fs = FeatureSetByPortalItem(portal,"<id>",<layer>,['*'],false);
var date_dict = {
fields: [{name: "MaxDate", type: "esriFieldTypeString"},{name: "Tract", type: "esriFieldTypeString"}],
geometryType: "esriGeometryPolygon",
features: [],
};
var acq_sql = "Appraisal IS NOT NULL and Survey IS NOT NULL and Opinion IS NOT NULL";
var acq_filter = Filter(fs, acq_sql);
for (var feature in acq_filter){
var max_appr = Number(feature['Appraisal'])
var max_surv = Number(feature['Survey'])
var max_titl = Number(feature['Opinion'])
var tract_num = (feature['tracts'])
var max_date = Text(Max(max_appr, max_surv, max_titl));
Push(date_dict.features, {"attributes": {"MaxDate": max_date,"Tract": tract_num},geometry: Geometry(feature)})
};
var newFeature = FeatureSet(Text(date_dict));
var orderFS = OrderBy(newFeature, 'MaxDate desc')
return orderFSA temporary workaround I have set is an action from this data expression list to filter another list using the same filter criteria but sorted by 'tracts'. Users have to click twice, but that's not a huge deal - would be nice to be one click though.