Help

Upcoming database upgrades. to improve our reliability at 03:30 UTC on Feb. 25 / 7:30pm PT on Feb. 24. Some users may briefly experience slow load times or error messages. Learn more here

Autonumber formula in primary field

Topic Labels: Formulas
2456 4
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi,

I would like my primary field to be autonumbered, starting with “PW10001”, then +1 value to each new record (so PW0002, PW0003, etc). I think I need a hidden Autonumber column to give me each new sequential number, but I’m stuck on how to string the formula together in the primary field to bolt the “PW10000” to that.

Can anyone help?

4 Replies 4

Hi @Mike_Ashton,

You do need an Autonumber field, and then in your Primary field you’ll need a formula like this:

"PW" & 
 10000 + {Autonumber Field}

Once you hit 10,000 records created in this manner, the result is going to be:
“PW20000”

Is that what you want? Is 10k records an issue?

Hi Jeremy,

Thank you so much for this. 10k records is fine, thanks. I have copied and pasted exactly, then changed {Autonumber Field} to the col. name, which is “ID”, the column gives “NaN” all the way down. I have tried with and without curly brackets, so

“PW” &
10000 + ID

and

“PW” &
10000 + {ID}

same result both ways?

My bad, Mike - you need parentheses around the math portion:

"PW" &
(10000 + {ID})

Hi Jeremy,

It works perfectly - thank you so much for your help. :blush:

Mike