Auto generated numbers

  • 1
  • 2
  • Question
  • Updated 10 months ago
  • Answered

I'm looking to create an auto-generate sequential number....without using the Record ID #. We are almost 3 years into Quickbase using a table that had no record number. Now we want one and I can't start with 4,356, it needs to start with 1. Is there a way to have an auto-generated number without linking it to the Record ID#?

Photo of Jeff

Jeff

  • 10 Points

Posted 3 years ago

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

QuickBaseCoach App Dev./Training, Champion

  • 62,944 Points 50k badge 2x thumb
I suggest a numerbing system based on the formula

[Record ID#] - 4,356
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,944 Points 50k badge 2x thumb
There actually is a way to have a formula field be a Key field.  It can be set using a manually typed API to set the Key field.  Maybe you can explain your exact situation.
Photo of Manish Tewari

Manish Tewari

  • 162 Points 100 badge 2x thumb
I'm in the same situation. I have a product table which needs a product_ID as a auto generated sequence number. The Product_ID is also the key to this table, so I cannot populate it using Record ID #. Can you provide some pointers to manual API thing to set a formula field as a key field? Thanks.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,944 Points 50k badge 2x thumb
I have never testing using a record ID# as a Key field as part of a formula field.

If you want to test that in a copy fo your app, you can type the API

you would get to the tale and then observe the URL.  Then after the ? in the URL you would erase what is there and type

act=API_SetKeyField&fid=99

where 99 is the field ID of the formula field.

So..
1. i have never tested using the [Record ID#] in a formula as the Key field.
2. I would test this in a copy of the app first.

During this process disable the need for Application Tokens in your app.
Photo of Zee Ali

Zee Ali

  • 84 Points 75 badge 2x thumb
Is there no easier way to do this? I'm new to Quickbase - no idea how to access the API yet.  I'm actually surprised for Record IDs the number does not get automatically generated especially if it's being used as a Key Field. 
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 62,944 Points 50k badge 2x thumb
Zee,
It would be better to post a new question explaining your question.

Every QuickBase table has the built in system fields which counts up by 1 for every record created and never duplicates.  The field name is Record ID#