I'm looking for a VB or Python field calculator expression in ArcMap that will calculate the Highest Value + 1 into the same field named Corr_ID. I was thinking something as simple as this max(!Corr_ID!)+1 but I think the max function requires more than one field. I can't use an Incrementing ID because some of the records need to have the same value.
Asked
Active
Viewed 61 times
0
-
Doesnt seem possible: https://gis.stackexchange.com/questions/90697/how-to-populate-new-field-using-expression-containing-max-value-from-another-fie . It is possible using arcpy though, does it have to be Field Calculator? – BERA Dec 28 '21 at 18:11
-
Doable if you are happy with layer name to be hard coded e.g. https://gis.stackexchange.com/questions/193681/calculating-sequential-numbers-into-sorted-table-using-arcgis-desktop/193684#193684 – FelixIP Dec 28 '21 at 18:55
-
It's certainly possible, just not terribly efficient (and could corrupt enterprise tables, where IDs aren't always sequentially allocated). If you initialize a global value from a SearchCursor/sort/tail inline you'll have a starting place. – Vince Dec 29 '21 at 02:21