Bug ID Number |
BUG-000173875 |
Submitted | January 27, 2025 |
Last Modified | February 12, 2025 |
Applies to | ArcGIS Pro |
Version found | 3.4 |
Operating System | Windows OS |
Operating System Version | 11.0 64 bit |
Status | As Designed
After review by the development team, it has been determined that this behavior is as designed. See the Additional Information section for details.
|
Additional Information
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.
Workaround
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
}"
Steps to Reproduce