Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Concatenate depending on a single select field.

Solved
Jump to Solution
208 5
cancel
Showing results for 
Search instead for 
Did you mean: 

Hi!

I have a single select field with two campaign options: Paid Media and Email Nurture. I am trying to create a name field that would concatenate different values, depending on the selected option. I wrote the following line, which is not accepted.

IF({Campaign Type} = "Paid Media", "CONCATENATE{Campaign Tactics}, " — ", {Asset}, " — ", {Webpage}", IF({Campaign Type} = "Email Nurture", "CONCATENATE{Campaign Tactics}, " — ", {Steps}, " — ", {Persona}"))

Would appreciate any suggestions on how to write this correctly and make it work. Thank you!

1 Solution

Accepted Solutions

Using the formula below, I was able to concatenate different single line text fields depending on the single select item. I would suggest

  • checking to make sure that your single select doesn't have any stray spaces before or after
  • using curly braces only on the fields that have spaces in them - {Campaign Type} gets them but Asset doesn't

 

IF({Campaign Type}="Paid Media", CONCATENATE(First, " - ", Third), IF({Campaign Type}="Email Nurture", CONCATENATE(Second, " - ", Third), " "))

Screen Shot 2022-12-16 at 10.41.41 AM.png

 

See Solution in Thread

5 Replies 5

It looks like you have some quotation marks where you need parentheses and you’re missing the final ‘value if not true’ condition. The formula below will give a blank if Campaign Type is neither Paid Media or Email Nurture. 

IF({Campaign Type} = "Paid Media", CONCATENATE({Campaign Tactics}, " — ", {Asset}, " — ", {Webpage}), IF({Campaign Type} = "Email Nurture", CONCATENATE({Campaign Tactics}, " — ", {Steps}, " — ", {Persona}), “ “))

Hi! And thanks for the reply! I tried the formula above but still not working.

Can you post a screenshot or provide a read-only link with sample data? That would help trouble-shoot.

Using the formula below, I was able to concatenate different single line text fields depending on the single select item. I would suggest

  • checking to make sure that your single select doesn't have any stray spaces before or after
  • using curly braces only on the fields that have spaces in them - {Campaign Type} gets them but Asset doesn't

 

IF({Campaign Type}="Paid Media", CONCATENATE(First, " - ", Third), IF({Campaign Type}="Email Nurture", CONCATENATE(Second, " - ", Third), " "))

Screen Shot 2022-12-16 at 10.41.41 AM.png

 

This works! Big thanks! 🙂