Oct 13, 2022 08:42 AM
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:
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!
Solved! Go to Solution.
Oct 13, 2022 09:06 AM
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.
Oct 13, 2022 09:06 AM
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.
Oct 13, 2022 10:15 AM
Hello Nathaniel! Thank you for the quick response!
I am getting this error when I paste your recommendation:
Oct 13, 2022 10:39 AM
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"
)
)
)
Oct 13, 2022 05:08 PM
This worked! Thank you so much!