laptop and a wrench

漏洞

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

上次发布: March 28, 2022 ArcGIS Online
漏洞 ID 编号 BUG-000147614
已提交March 15, 2022
上次修改时间June 5, 2024
适用范围ArcGIS Online
找到的版本9.4
操作系统N/A
操作系统版本N/A
状态Will Not Be Addressed

附加信息

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

解决办法

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;

重现步骤

漏洞 ID: BUG-000147614

软件:

  • ArcGIS Online

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项