gmarcello

Python Sequential Number Gen starting value

Discussion created by gmarcello on Apr 11, 2011
Latest reply on Apr 11, 2011 by gmarcello
Looking for a way to adapt this Python sequential number generator to use the LAST value +1 in a given field for pStart:

rec=0
def autoIncrement():
global rec
pStart = 1 #adjust start value, if req'd
pInterval = 1 #adjust interval value, if req'd
if (rec == 0):
  rec = pStart
else:
  rec = rec + pInterval
return rec

autoIncrement()

Outcomes