| 漏洞 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
}"
重现步骤