Help

RECORD_ID() max length

3152 4
cancel
Showing results for 
Search instead for 
Did you mean: 
VeskoJl
4 - Data Explorer
4 - Data Explorer

Hi, guys,

Does anybody know what’s the max length of the value returned from RECORD_ID() ?
Is there any specification of the returned data type and its size/length?

Thanks in advance!

4 Replies 4

Well, I thought RECORD_ID() returned a 14-character BASE64 sequence preceded by the three-character prefix ‘rec’, but it appears it’s a 14-character BASE62 sequence. In any case, I think it’s safe to assume the response will be 17 characters long…

Hmm, thanks W_Vann_Hall, but the ID-s that I already get are 17 chars long, so to stay on the safe side I decided to store them as 20 char strings, but your response leads me to think there isn’t really any specification that defines the max length of these strings.

No, 17-characters is the max length — that’s something the developers aren’t going to change without significant advance warning, as there are far too many applications that expect such. The only part I’m not sure about is the exact nature of the 14 trailing characters: The API documentation makes it appear they’re hexadecimal. Visual inspection makes them appear to be BASE64, but in sampling a 10,000-record table, I found no record ID that contained any of the non-alpha, non-numeric characters commonly added to ‘0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz’ for a 63rd and 64th token, so I have to assume it’s BASE62. (The decision to go with 14 significant characters may be GS1 barcode-related — or not…)

Again, I don’t think you need worry about record IDs longer than 17 characters. (In fact, if this was still the 1980s, you’d probably be safe allocating 14 characters per ID and amputating the leading ‘rec’.)


Edit: Since you’re talking about specific storage allocation, I have to assume you’re storing them outside of Airtable. In that case, you may want to check this earlier thread.

Thanks, Van Hall, that was really useful.