Help

Re: Looking for someone create a random 4 numeric digits

2543 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Xing
6 - Interface Innovator
6 - Interface Innovator

Hi, I want to post a job that I’m looking for someone we can create us a solution that we can have a random 4 numeric digits, that we want to have a random unique combination of four digits, the “0” ( or “00”, “000”) can not be in the beginning, in practical, when I create the records on the column, for example “Book” is the first column (primary key in airtable), the records will be “Book 1”, “Book 2”, Book 3"….and I want whenever I create a new records, for instance “Book 4”, there would be generating the random unique combination of four digits automatically on column “ID”, please see the image I’ve attached.

Screen Shot 2018-12-11 at 2.23.38 AM.png

I need some excellent folks to help.
Let’s try to make this happen.

32 Replies 32

I like what you came up with for product codes with category codes. This can be really helpful to gain information about a product from just glancing at the product number. Incredibly helpful if you are pulling stock off of shelves and you don’t want to look it up in the database. Often set length abbreviations are used rather than numbers. So if the length was four the categories might be:

  • POST => poster
  • MSPD => mousepad
  • BOOK => book

The issue with a human readable SKU (Stock-keeping Unit) system is that it takes more work to come up with. It might be useful to have that information. Sometimes it’s easier to just use a simple part number. And I agree with @Xing about random being better. What’s important is that the number is unique. Letting the numbers run sequentially implies that they follow an order. These rules will often break. So even though its extra work removing the ability to make this assumption can be incredibly helpful.

bdelanghe
7 - App Architect
7 - App Architect

Side note: if anyone wants to generate random numbers within Airtable:

  1. Create a formula field with RecordID()
  2. Sort by previous field
  3. Create ‘Autonumber’ field
  4. Delete ‘RecordID’ field

The Autonumber will now be shuffled. This means that your range will be only as big as your number of records. (You can also leave the ‘RecordID’ field and turn on auto sort with will shuffle these records in which could be helpful if you wanted a “Random Sort”)

@Xing -

A little (well, a lot) late, but the solution is here. You’ll need to tweak it a bit to make sure the values are all > 999, though.