Hi guys, this code works fine in AGOL Classic and shows in the popup, but no results are listed in the Map Viewer popup. (The result shows fine in Map Viewer while testing, as attached. I need this to work in the Map Viewer popup.)
What do I need to do to have the list show in the Map Viewer popup?
var features = FeatureSetByName($datastore, 'Vegetation', ['*'], false);
var aDict = Schema(features);
var aArray = aDict['fields'];
var output;
for (var i in $feature) {
if ($feature[i] == 'Yes') {
for (var j in aArray) {
var dict = aArray[j];
if (dict['name'] == i) {
output += dict['alias'] + TextFormatting.NewLine
}
}
}
};
return replace(output, '_', ' ');