Generate a Unique Numeric Code whenever a customer is Created?

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
Alright guys, I'm blanking out on this one. Is there any way to generate a unique (sequential if possible) number everytime I create a Customer and then assigning that number to said customer? 

So I create Customer "A" and then as soon as it is created, Quickbase generates a number to assign to it "Customer Code".

I cant use the record ID because the number has to follow the format "BXXXX"

Any ideas?
Photo of Manny De La Cruz

Manny De La Cruz

  • 940 Points 500 badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
no problem.  You are over thinking this, assuming that you just need a sequential number beginning with B.

The formula text formula would be

"B" & totext([Record ID#])

Now, you will need to think though how you want to start the numbering since you may not want to have the first Customer be Customer # B1.

So one choice is to import say 999 dummy records and hence start off at B1000.

Or else perhaps

"B" & right("0000" & totext([Record ID#]),5)

so that would read B00001.

assuming that you would never have more than 9999 Customers.
(Edited)
Photo of Manny De La Cruz

Manny De La Cruz

  • 940 Points 500 badge 2x thumb
Thank you! This is perfect. As a side note, is there a way to just add in something like +400 so the number would be 427 instead of 27
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 65,320 Points 50k badge 2x thumb
While you can certainly do that, I personally don't recommend it.  I just feel that its a one time setup to import say 400 dummy records and then immediately delete them.  That will take an extra 5 or max 10 minutes.

Then its nice and clean.  The [Record ID#] is then essentially the same as the Customer number.