Apr 26, 2021 08:40 AM
I am trying to create a formula to name records by concatenating specific fields but using different groups of fields depending on the item type.
In other words:
IF {Item Type} is Watch,
THEN CONCANTENATE {Field 1} {Field 2} {Field 3}
ELSE
IF {Item Type} is Necklace CONCANTENATE {Field 4} {Field 5} {Field 6}
… and so on for 8 or so item types.
This is how the formula looks currently:
Is it possible to do this?
Help appreciated! I love Airtable but I have no formula skillz.
Apr 26, 2021 09:05 AM
Sounds like you want to use SWITCH()
instead of a nested IF()
statement since you’re checking the same variable against multiple possible values:
SWITCH(
{Item Type},
"Watch", CONCATENATE({Field 1}, " ", {Field 2}, " ", {Field 3}),
"Necklace", CONCATENATE({Field 4}, " ", {Field 5}, " ", {Field 6}),
"3rd item type", CONCATENATE(...),
"4th item type", CONCATENATE(...),
"5th item type", CONCATENATE(...),
"some sort of default value if none of the above item types match"
)
Apr 26, 2021 11:46 AM
Thanks for the tip! I’ll play around with this tomorrow. :thumbs_up: I’m also going to check out your podcast. :slightly_smiling_face:
May 03, 2021 01:25 AM
Update: So far this is working beautifully. Thanks again & the podcast is great. :thumbs_up: