laptop and a wrench

漏洞

Despite the validity of the expression, the calculation attribute rule is generating an error message in Arcade, specifically "ERROR 002717: Invalid Arcade Expression, Arcade error: Index out of bounds".

ArcGIS Pro
漏洞 ID 编号 BUG-000173875
已提交January 27, 2025
上次修改时间February 12, 2025
适用范围ArcGIS Pro
找到的版本3.4
操作系统Windows OS
操作系统版本11.0 64 bit
状态As Designed

附加信息

This is as designed. Arcade is a programming language needing to be authored to handle errors. In this particular case, the first feature in the table, which is used by the expression builder for verification, happened to have a whitespace in "$feature.location" which passed the validation. However, when subsequent new features are created, they may have a location without a whitespace, which results in a split returning one element instead of two. This is why the rule sometimes works and sometimes fails. So, a guard logic must be added regardless.

解决办法

Add error handling for cases where the locArray variable has 0 or 1 items. Refer to the example below.

"var MainLoc = text($feature.LOCATION)

var locArray = Split(MainLoc, " ")

if ( Count(locArray) < 2 ) { // error handling

 return

} else { // existing code

 var abrevTship = locArray[1]

 return abrevTship

}"

重现步骤

漏洞 ID: BUG-000173875

软件:

  • ArcGIS Pro

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

下载 Esri 支持应用程序

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

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项