I used the following Arcade code from this forum to filter out empty fields. When I run it in the Arcade console, it seems to work fine. And it worked fine when I had the "Fields list" component added to the pop-up. However, when I only have the Arcade component selected, it will not display a filtered table.
Is this a bug or is this intentional? Having two field tables would be redundant.
var flds = ['Field_1','Field_2','Field_3','Field_4','Field_5'];
var info = [];
var atts = {};
for (var i in flds) {
var fldname = flds[i];
if (!IsEmpty($feature[fldname])) {
Push (info, {'fieldName': fldname})
atts[fldname] = $feature[fldname];
}
}
return {
type: 'fields',
title: 'My Title',
description : 'My description',
fieldInfos: info,
attributes : atts
}