Hey everyone! I am trying to calculate a unique id for every test my field staff do out in the field. As we will have multiple crews in the field working offline I wanted to add the supervisors initials to it to keep the records unique. For some reason my code starts at 1-xy but then when put the next point down it jumps to 12-xy, and then every point after that remains at 12-xy for every point afterwards. If anyone has some insight into why its not calculating properly I would really appreciate it.
This is the code I have that is not calculating properly :
var numberlist = FeatureSetByName($map, "Subsurface Inspections")
var topnum = Top(OrderBy(numberlist,'OBJECTID'),1)
var counter = Number(Max(topnum,'OBJECTID'))
var id = counter + 1
var sup = $feature.Supervisor
return id + '-' + sup
Thanks!