Hello,
I am trying to use the expression mentioned on this page to generate the next number in a field that stores the record number of observations collected in the field. The field idlong is an integer field and is located in the hosted feature layer DataCollectionInspection.
Here is my version of the arcade expression:
var numberlist = FeatureSetByName($map,"DataCollectionInspection")
var topnum = Top(OrderBy(numberlist,'<idlong DESC'),1)
var counter = Number(Max(topnum,'idlong'))
var id = counter+1
return id
When I run it in the Arcade Editor, I get the following error message: Test execution error: Unknown Error. Verify test data.
Would anyone know what I am doing wrong?
Thanks!
Deb.