I see. That will only work for an iterative loop, not in the Field Calculate profile. When writing a field calculation in Arcade, you have to imagine that you're already in the loop, as the expression will be evaluated for every feature.
In Arcade, we can access and work with the other values in the layer, so you've got some options. Is the code stored only as a string, or is there some way to access the numeric val_counter without the prefix?
Also, what values are in this field right now? Are they null? Does the val_counter correspond to the number of records in the layer?
- Josh Carlson
Kendall County GIS