laptop and a wrench

Bug

When creating an Arcade expression for pop-ups, and disabling the fields, the expression no longer reports the correct result.

Last Published: March 28, 2022 ArcGIS Online
Bug ID Number BUG-000147614
SubmittedMarch 15, 2022
Last ModifiedJune 5, 2024
Applies toArcGIS Online
Version found9.4
Operating SystemN/A
Operating System VersionN/A
StatusWill Not Be Addressed

Additional Information

The function expects exist to handle cases like this issue. Refer to the following link for more information: https://developers.arcgis.com/arcade/function-reference/data_functions/#expects

Workaround

Use a slightly different expression to extract the information from the layer rather than the feature, like this:

var name = $feature.NAME;

var sql = "Name = @name";

var feat = First(Filter($layer, sql));

var result = "";

var flds_days = ["Mon", "Tues", "Wed", "Thur", "Fri"];

var dict_days = {"Mon" : "Monday", "Tues" : "Tuesday", "Wed" : "Wednesday", "Thur":"Thursday", "Fri":"Friday"};

for (var i in flds_days) {

  var fld = flds_days[i];

  var data = feat[fld];

  if (data == 1) {

    if (result == "") {

      result = dict_days[fld];

    }else {

      result += TextFormatting.NewLine + dict_days[fld];

    }

  }

}

if (result == "") {

  result = "None";

}

return result;

Steps to Reproduce

Bug ID: BUG-000147614

Software:

  • ArcGIS Online

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options