Help

Re: Creating Groups from a Segment of Text in Text Field

Solved
Jump to Solution
837 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Lindsay_Kirsch
4 - Data Explorer
4 - Data Explorer

Hello!

I would like to create groups based on a “contains” value in a text field. Since this is not an available option, I think I am going to need to use a formula to create a field that I can group by.

Objective: Create a conditional formula that will select a drop-down based on conditions.

Sample Data:
image

What I would like to happen:
If Campaign Name contains “PF_MU30_Weekly” Change Email Type to “Weekly”
If Campaign Name contains “PF_MU30_ReEngagement” change Email Type to “ReEngagement”
If Campaign Name contains “PF_MU30_Engagement” change Email Type to “Engagement”

From here then I can group by the Email Type field.

Thank you for your help!

1 Solution

Accepted Solutions
Nathaniel_Grano
8 - Airtable Astronomer
8 - Airtable Astronomer

Hi @Lindsay_Kirsch !

A Single-Select field (i.e. “dropdown”) cannot contain a formula. Only a formula-type field can contain a formula. If you don’t care about the “Email Type” field being a dropdown menu, then you can make it a Formula type field and use this formula:

IF(SEARCH("PF_MU30_Weekly",Name),
  "Weekly",
  IF(SEARCH("PF_MU30_ReEngagement",Name),
    "ReEngagement",
    IF(SEARCH("PF_MU30_Engagement",Name),
      "Engagement"
    )
  )
)

If you need that to be a dropdown column, then there are some other possibilities, but it will be more complex and possibly involve an automation.

See Solution in Thread

4 Replies 4
Nathaniel_Grano
8 - Airtable Astronomer
8 - Airtable Astronomer

Hi @Lindsay_Kirsch !

A Single-Select field (i.e. “dropdown”) cannot contain a formula. Only a formula-type field can contain a formula. If you don’t care about the “Email Type” field being a dropdown menu, then you can make it a Formula type field and use this formula:

IF(SEARCH("PF_MU30_Weekly",Name),
  "Weekly",
  IF(SEARCH("PF_MU30_ReEngagement",Name),
    "ReEngagement",
    IF(SEARCH("PF_MU30_Engagement",Name),
      "Engagement"
    )
  )
)

If you need that to be a dropdown column, then there are some other possibilities, but it will be more complex and possibly involve an automation.

Hello Nathaniel! Thank you for the quick response!

I am getting this error when I paste your recommendation:
image

Hi again,
yes, you’ll need to change the word “Name” in the formula to be your column’s name, which I believe is “Campaign Name” from your photo. Since that has a space in it, it needs to be wrapped in curly braces:

IF(SEARCH("PF_MU30_Weekly",{Campaign Name}),
  "Weekly",
  IF(SEARCH("PF_MU30_ReEngagement",{Campaign Name}),
    "ReEngagement",
    IF(SEARCH("PF_MU30_Engagement",{Campaign Name}),
      "Engagement"
    )
  )
)
Lindsay_Kirsch
4 - Data Explorer
4 - Data Explorer

This worked! Thank you so much!