Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

Danielle_Wong
Level 8 - Community Advisor

Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

So here's the situation:

  1. Our Contact Type field can have many values in it. Some of those values are
    1. Primary Contact
    2. ABC Primary Contact
    3. XYZ Primary Contact
  2. It is possible for a record to have 1 or more of these Contact Types
  3. I need to send an email to anyone who has Contact Type that contains Primary Contact, BUT NOT people who are XYZ Primary Contact or ABC Primary Contact and do not have Primary Contact.
    1. Yes, I thought I could technically do that by
      1. Contact Type contains Primary Contact AND Contact Type not contains XYZ;ABC
        1. BUT then the people who have Contact Types Primary Contact and XYZ Primary Contact would be excluded. We would want these people included in my mailing

I hope you were able to follow along. Hoping someone has an idea they can share on how to achieve this.

Thanks!

Danielle

7 REPLIES 7
SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

Surround the list of values with an extra delimiter.

That is, instead of

Primary Contact,ABC Primary Contact

use

,Primary Contact,ABC Primary Contact,

Then a filter on [contains]

,Primary Contact,

finds an exact match on only that inner value.

This is an age-old programming technique that should be used for delimited strings.

Ankit_Dua
Level 6

Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

This is awesome

SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

I still remember the first time I saw this used in a SQL VARCHAR column ages ago and had the a-ha! moment.

Ankit_Dua
Level 6

Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

You are amazing

Danielle_Wong
Level 8 - Community Advisor

Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

Thanks Sanford for that great idea! How would I surround it by a delimiter? I'm guessing that would have to be programmed in SFDC since this is an SFDC custom field.

SanfordWhiteman
Level 10 - Community Moderator

Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

If it's coming from SFDC then it'd be best to do it there.

But you could also use Change Data Value on the Marketo side: if the current value doesn't start with "," then add "," at beginning and "," at the end.

Danielle_Wong
Level 8 - Community Advisor

Re: Is there a creative way to Include and Exclude Field Values that are within Other Field Values?

Do you have any tips on how to do it in SFDC? I couldn't find any good resources in my search, but maybe I'm not using the right keywords to find the solution. Thanks Sanford!