# Is there a formula to generate a unique number?

• 1
• Question
• Updated 4 years ago

Hello, I have a field which I need to generate a unique number into.

I haven't got a clue how to start that formula. So I am trying to base my calls of ticket numbers. and I am not sure if there is a formula that will generate unique numbers, that wont duplicate them.

• 0 Points

Posted 4 years ago

• 1
• 72,488 Points
Absolutely!

The best unique number is the [Record ID#]!  If for some reason want to start at a certain value, for example sometimes people want to have say a 4 digit number, then the best way is to import a bunch of dummy records using Excel and then delete the records.  But don't run past your Target records start # as there is no rolling back of the number.
• 72,488 Points
btw, you might decide to rename the [Record ID#] field to be called [Ticket #]
• 0 Points
So I have a question. I think this will work, I can only see one problem. I have a field that we were entering our own numbers. Is there away I can add all those number we already used to QB so the Record ID knows not to use those numbers.
• 0 Points
Or is there away to go back and rename all the QB numbers?
• 72,488 Points
No. The record ID field is central to QuickBase. It starts at 1 and inexorably goes up by 1 for each new record.  I suggest that you just start at a higher number than your old numbers.
• 0 Points
How do I start form a Higher number? Do I just do the dummy records?
• 72,488 Points
The best way is to import X number of records and then mass delete them.  Some people will take the existing [Record ID#] and add say 10,000 to it as use that as a formula [Ticket #], but personally I say its worth it to do it clean and import X records and mass delete.  But do not overshoot, as there is no rolling back the odometer.
• 0 Points
ToNumber([Record ID#]) + ToNumber(10,000)
I assume that will work the same.
• 72,488 Points
[Record ID#] is already numeric and 10000 is also a number, so all you need is

[Record ID#] + 10000
• 0 Points
Thank you!