Hi all,
I have a simple map where the main point data are pulled from a live/referenced CSV published via Google Sheets. I used an Arcade expression (through the "Add Content > Arcade" block) to prevent any fields with null/empty string records from displaying in the pop-ups (styled as just the default attribute table). Until the update, it was working perfectly.
After the update yesterday, the correctly configured table will initially display for a single point, but when I click on other features (or back to that original point), where the table should be in the pop-up is completely blank. I can reliably reproduce this when I toggle "Enable pop-ups."
When I test run the code, the correct output appears. I'm definitely a beginner with Arcade and got the code below from another user, modifying it for my map. I've already tried quite a few workarounds, but nothing is producing what I had before -- it's just blank. The Text block that precedes the Arcade expression still displays normally.
Is this an update bug, or should I be doing something different? I would appreciate any help. Let me know if I can provide further details. Thank you!
Here is the code that previously worked for me:
var attributes = Dictionary($feature)["attributes"];
var fieldInfos = [];
var attributeValues = {};
var excludeFields = ["Field1", "Field2", "Field3"]; //Excluded fields, null or not null
var layer_schema = Schema($feature);
var fieldAliases = {};
for (var i = 0; i < Count(layer_schema.fields); i++) {
var field = layer_schema.fields[i];
fieldAliases[field.name] = field.alias;
}
for (var key in attributes) {
var value = attributes[key];
if (!IsEmpty(value) && value != "" && IndexOf(excludeFields, key) == -1) {
var displayName = key; // Default to field name
// Use alias if available
if (HasKey(fieldAliases, key)) {
displayName = fieldAliases[key];
}
Push(fieldInfos, { fieldName: key, label: displayName });
attributeValues[key] = value;
}
}
return {
type: 'fields',
fieldInfos: fieldInfos,
attributes: attributeValues
};