Help

This Product Ideas board is currently undergoing updates, but please continue to submit your ideas.

Leading Zeros for Number Field

cancel
Showing results for 
Search instead for 
Did you mean: 
airship
7 - App Architect
7 - App Architect

I need leading zeros for the Number field for shot lists for video. Leading zeros “1” would be written as “01” or “001”. This is useful for ordering files by name, inventory SKU’s, etc.

7 Comments
Vivid-Squid
11 - Venus
11 - Venus

Does it need to be a number type field? Can you use a text field instead? You can convert it back to a number later if needed.

airship
7 - App Architect
7 - App Architect

In my view, the purpose of using a tool like Airtable is recognizing data for its particular function to harness it. Sure, I could use a text field. But then Airtable loses its powers and I might as well use Google Sheets instead. For example, if I want to number sequentially from 1 to 10, with a numbers field I can use the fill handle to do this within seconds, rather than manually filling out each field.

Airtable Support | Quickly filling cells using fill handle | Continuing a series of data

Vivid-Squid
11 - Venus
11 - Venus

I see what you are saying and I don’t disagree.

How do you do this in Google Sheets with the column formatted as a Number?

kuovonne
18 - Pluto
18 - Pluto

Use a formula field to pad the number with leading zeros.

For example, if you want a total of three digits, and are sure that your initial number is three digits or less…

CONCATENATE(
  REPT(
    "0",
    3 - LEN({number} & "")
  ),
  {number}
)
airship
7 - App Architect
7 - App Architect

I appreciate the suggestion. I input the formula as-is but am getting an error message:

Sorry, there was a problem saving this field. Unknown field names: number

Was I supposed to modify any words in the formula?

kuovonne
18 - Pluto
18 - Pluto

You need to replace {number} so that it matches the name of your field.

airship
7 - App Architect
7 - App Architect

Thank you for clarifying, the formula now works! But I guess it’s dependent on the {X} column to produce the leading zero results.