I am exploring Add Attribute Rule in ArcGIS Pro 2.1-beta.1. I want to look at all values in an ID field, take the max value, and add 1. This way I can set up a rule that will always add the sequential number on INSERT. How can I create an array of all existing values in an ID field? Is this possible with an arcade expression?
Has this been answered anywhere? I'm new to Arcade expressions. Thanks!
Take a look at Create Database Sequence—Data Management toolbox | Documentation . Sequences do the dirty work for you at the database level, all you do is create a simple attribute rule to use them at the feature class level.
this workd for me
var features = FeatureSetByName($datastore,"polygons",["ID"],true)
var NewID = Max(features,"ID")+1
return NewID