Help

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

Topic Labels: Formulas
1404 3
cancel
Showing results for 
Search instead for 
Did you mean: 
mrjamesfrank
5 - Automation Enthusiast
5 - Automation Enthusiast

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:

concantenation as is

Is it possible to do this?

Help appreciated! I love Airtable but I have no formula skillz.

3 Replies 3

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

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:

mrjamesfrank
5 - Automation Enthusiast
5 - Automation Enthusiast

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