I'm having a really weird issue with one of my arcade field calculation in Pro. I've been using this to calculate IDs for my features, and it's been working until I updated to 3.4 recently.
We have IDs that are a concatenation of the asset type abbreviation and an incremental integer with leading 0s, so my expression finds the current highest ID number, adds 1 to it, and returns the concatenated value with 0 padding applied.
Now, however, when I grab the highest current integer, it is giving me a NaN. Added some console statements to my expression to try and figure out what was going wrong:
So, my list of values contains the integers, and they are properly typed as Number, until I use the First() function, at which point the value is preserved but the type changes to "Unrecognized Type", which then becomes NaN when I try to increment it.
The exact same expression results in the correct ID being generated when I try it in the Arcade Playground if I load my data up as a FeatureSet from json:
Any suggestion how I can resolve this and get my calculation working again?
Have you tried strong-arming the "number" after the you "first" it by using the Number() function? I've had to do this in a few places where it makes no sense to need to. Basically the same as you, where I definitely feed a function a number but need to specify it is a number later using that function.
Good suggestion. Unfortunately, when I try this it does convert the value to a number, but it just happens that that number is NaN: