laptop and a wrench

Error

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

Última publicación: March 28, 2022 ArcGIS Online
Número de ID del error BUG-000147614
EnviadoMarch 15, 2022
Última modificaciónJune 5, 2024
Relacionado conArcGIS Online
Versión encontrada9.4
Sistema operativoN/A
Versión de sistema operativoN/A
EstadoWill Not Be Addressed

Información adicional

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

Solución alternativa

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;

Pasos para reproducir

ID del error: BUG-000147614

Software:

  • ArcGIS Online

Recibir notificaciones cuando cambie el estado de un error

Descargar la aplicación de soporte de Esri

Descubrir más sobre este tema

Obtener ayuda de expertos en ArcGIS

Contactar con el soporte técnico

Descargar la aplicación de soporte de Esri

Ir a opciones de descarga