I've run into an issue here where the same exact expression will be validated and work fine for the shapefile version of a layer, but not the web version. The only difference is the field name (truncated in the shapefile). It's a text field.

Shapefile on right, feature service on left.
It throws an error that the index is out of bounds. Is it just looking at a random feature, seeing a null value, and assuming none of the features have values? For features with no county signed route, in the shapefile, they are just populated with a space. A typical field with a value reads something like 'STATE OF IOWA, Z 16, N' and the Arcade spits out Z16 as its label.

Taking suggestions on how to work around this. Thanks!