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.

Zuletzt veröffentlicht: March 28, 2022 ArcGIS Online
Bug-ID-Nummer BUG-000147614
EingereichtMarch 15, 2022
Zuletzt geändertJune 5, 2024
Gilt fürArcGIS Online
Gefunden in Version9.4
BetriebssystemN/A
BetriebssystemversionN/A
StatusWill Not Be Addressed

Zusätzliche Informationen

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;

Schritte zur Reproduzierung

Bug-ID: BUG-000147614

Software:

  • ArcGIS Online

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln