Ideas for making IF/THEN statements to CONCANTENATE fields depending on "item type"

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.

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"
)
2 Likes

Thanks for the tip! I’ll play around with this tomorrow. :+1: I’m also going to check out your podcast. :slight_smile:

Update: So far this is working beautifully. Thanks again & the podcast is great. :+1: