Skip to main content
Solved

Concatenate depending on a single select field.

  • December 15, 2022
  • 5 replies
  • 48 views

Forum|alt.badge.img+1

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!

Best answer by pressGO_design

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

 

5 replies

pressGO_design
Forum|alt.badge.img+21

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}), “ “))


Forum|alt.badge.img+1
  • Author
  • New Participant
  • December 16, 2022

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.


pressGO_design
Forum|alt.badge.img+21

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


pressGO_design
Forum|alt.badge.img+21

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

 


Forum|alt.badge.img+1
  • Author
  • New Participant
  • January 6, 2023

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

 


This works! Big thanks! 🙂