I'm trying to field calculate some records that have a null value. I used the following code from the ESRI help section on sequential calculations. It worked! Now I need to modify the script a bit. This code gives me a sequential order of single digits. I would like to have some zeros before the new assigned digit. 0001 instead of just 1. How do I add the three zeros before the assigned digit? I would like a four digit value in the end. 0001, 0002, 0003, etc.
Here's the python code I used:
pStart = 1 #adjust start value, if req'd
pInterval = 1 #adjust interval value, if req'd
if (rec == 0):
rec = pStart
rec = rec + pInterval