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 Support アプリのダウンロード

このトピックについてさらに調べる

ArcGIS エキスパートのサポートを受ける

テクニカル サポートへのお問い合わせ

Esri Support アプリのダウンロード

ダウンロード オプションに移動