How do you populate a Field with consecutive numbers in the field calculator ?
The following Field Calculator expression (which must be used with the Python Parser), will auto increment a numeric field. We can modify the pStart = 1 and pInterval = 1 parameters to control the starting number as well as how much it will increment by.
Pre-Logic Script Code:
global recrec=0def autoIncrement(): global rec pStart = 1 pInterval = 1 if (rec == 0): rec = pStart else: rec += pInterval return rec
GIS Analyst II
City Of Newnan
25 Lagrange St.
Newnan, Georgia 30263
Retrieving data ...