Skip to content

Instantly share code, notes, and snippets.

@saviour123
Last active October 7, 2016 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saviour123/5079aa801159f0e3dab006b90e0cff5c to your computer and use it in GitHub Desktop.
Save saviour123/5079aa801159f0e3dab006b90e0cff5c to your computer and use it in GitHub Desktop.
rec=0
def autoIncrement(something):
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 "P" + str(rec)
@saviour123
Copy link
Author

Check the Codeblock. Like tick it
then
place Below in the second Box.
autoIncrement( !typeFieldName! )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment