IF Contains
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I've read several posts, but haven't found my exact question/answer. I have strings of several words in my SENDER column. I am creating a second column IF one of those words is Mickey or Minnie. I need to add about 5 more names and I have tried wording this different ways with IIF and with ELSEIF, etc, but I'm not quite getting it. Any thoughts on how to properly form this? Or is there an easier way? Thanks!
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey @summarizer! You will want to try something like this:
IF CONTAINS([Sender],"MICKEY") THEN "MICKEY" ELSEIF CONTAINS([Sender],"MINNIE") THEN "MINNIE" ELSE NULL() ENDIF
This uses elseif statements of the ||. You can extend it to include your other names as well. Hope this helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You will need an IF ELSEIF ELSE statement
IF Contains([Sender], "MICKEY") THEN
"MICKEY"
ELSEIF Contains([Sender], "MINNIE") THEN
"MINNIE"
ELSE
Null()
ENDIF
Stephen Ruhl
Principal Customer Support Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you both!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks for your post, how do we write the script if we're using an In Database formula? Do we have to write three separate scripts, different wording, or can it only be written in a out of Database formula? Thank you, Chuck
