Sure, you can do this with a formula field (or a couple).
First, you’ll want a formula field that creates the “Company” part of your ID string. Do this with if statements:
IF(
{Company} = "Airtable",
"AT",
IF(
{Company} = "Google",
"GL",
IF(
... etc
)
)
)
Then, in your ID field, you’ll just combine that with a call to RECORD_ID()
via concatenation like so:
IF(
{Company Initials},
{Company Initials}
)
&
`RECORD_ID()`

Hmmmmmmm I tried the first formula and obviously I am doing something wrong here?
Really appreciate your help Jeremy!

Hmmmmmmm I tried the first formula and obviously I am doing something wrong here?
Really appreciate your help Jeremy!
Hard to tell because I’m looking at your screenshot on my phone… but it looks to me like you might have an erroneous comma at the very end before the three closing parentheses.
If there are no further conditions to be processed in an IF() statement, then you don’t need additional commas, and the system is very strict about the syntax of that.
Sure, you can do this with a formula field (or a couple).
First, you’ll want a formula field that creates the “Company” part of your ID string. Do this with if statements:
IF(
{Company} = "Airtable",
"AT",
IF(
{Company} = "Google",
"GL",
IF(
... etc
)
)
)
Then, in your ID field, you’ll just combine that with a call to RECORD_ID()
via concatenation like so:
IF(
{Company Initials},
{Company Initials}
)
&
`RECORD_ID()`
Maybe the SWITCH()
function would be cleaner?
Maybe the SWITCH()
function would be cleaner?
Good point… SWITCH()
would be a lot cleaner.
Switch function works perfectly and is a lot cleaner! However, when I combine the Company ID and Unique ID with the below
IF({Company ID}, Record_ID())
It just shows the unique id and not the Company ID at the front of the string…I tried your formula Jeremy for this but it didnt want to work. Any thoughts?
I understand why it is just showing the Record_ID but how do I combine them to show both?
I understand why it is just showing the Record_ID but how do I combine them to show both?
IF(
{Company ID},
{Company ID}
)
&
RECORD_ID()
Found the answer!!
CONCATENATE({Company ID},{Unique ID})
Found the answer!!
CONCATENATE({Company ID},{Unique ID})
The &
is a shorthand for CONCATENATE()
.
You can just use:
{Company ID} & {Unique ID}
The &
is a shorthand for CONCATENATE()
.
You can just use:
{Company ID} & {Unique ID}
Champion, thank you for your help Jeremy!
Hi
As usual, I have learned something new. I might give this a try.
MK