Hello,
I have 2/3 of the code someplete. The middle portion has stumped me. I have an immediate insert rule that inserts the section tile name when a new point feature is created.
var getSec = FeatureSetByName($datastore, "Section", ["TILE_NAME"])
var getSecInt = Intersects(getSec, $feature)
var sec = First(getSecInt)
if (sec == null) return {"errorMessage": "Section Not Found"}
return sec.TILE_NAME
Tha last part checks for null values and inserts the next sequential value.
// get the latest feature with a ID
var last_feature = First(OrderBy(Filter($featureset, "ID IS NOT NULL"), "OBJECTID DESC"))
// get the last CW_ID and add 1
var seq = IIf(last_feature == null, 0, last_feature.ID) + 1
return Number(seq)
This works well for numbering all the features but what I need is sequential numbering by tile name. In the example below I'd like all the number on the left to be 4, 5, 6 and the numbers on the be 1 and 2. Thanks for your help!
