Discussions

Expand all | Collapse all

Generate a Unique Numeric Code whenever a customer is Created?

  • 1.  Generate a Unique Numeric Code whenever a customer is Created?

    Posted 05-31-2017 18:15
    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?


  • 2.  RE: Generate a Unique Numeric Code whenever a customer is Created?

    Posted 05-31-2017 18:20
    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.


  • 3.  RE: Generate a Unique Numeric Code whenever a customer is Created?

    Posted 05-31-2017 18:51
    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


  • 4.  RE: Generate a Unique Numeric Code whenever a customer is Created?

    Posted 05-31-2017 19:09
    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.