I have an automation to send out the list of form submission in email to a list of internal contacts. The DE looks something like this:

Email | Campaign | Date
[email protected] | Campaign One | 1 Jun 22
[email protected] | Campaign Two | 10 Jun 22
[email protected] | Campaign Two | 10 Jun 22

I created a "Send Email Activity" and filtered out contacts from "Campaign One" under "Advanced Exclusions > Exclusion Script". However, it seems like [email protected] was filtered out because the record is duplicated in the DE.


  1. What should I do to include contacts that appeared multiple times in the DE?
  2. How do I add multiple conditions? I tried using sometime like (AttributeValue("Campaign") != "Campaign One" AND AttributeValue("Date") != "1 Jun 22") but it doesn't work.

Exclusion Script

Any advice would be appreciated. Thank you.

  • 1
    "Campaign != 'Campaign One'" evaluates to "true" for anyone that does not have "Campaign One" as their Campaign. Only Campaign One records would be sent to. How do multiple clauses "not work"? Your example wouldn't evaluate to true for any of your sample records.
    – Macca
    Jun 21, 2022 at 8:19
  • It does not work because "[email protected]" exist for both "Campaign One" and "Campaign Two", so when Exclusion script excluded the record != "Campaign One", it somehow remove the same record from "Campaign Two".
    – Farrell
    Jun 27, 2022 at 3:44
  • Have you tried removing deduplication of subscribers for the send? My guess is deduplication's happening before the exclusion's applied, so maybe you're just left with the first record that's excluded.
    – Macca
    Jun 27, 2022 at 23:25

1 Answer 1


If you'd like to prevent sends to anyone that has a Campaign value of "Campaign One" or if they have multiple entries in the DE, then you could do something like this in your Exclusion Script:

AttributeValue("Campaign") == "Campaign One" 
OR rowcount(lookuprows("YOURDENAME","Email", AttributeValue("emailaddr"))) > 1

Since negative logic is confusing, I always use this mnemonic preceding my exclusion script conditional:

Exclude the send to this subscriber if ___ is true


20220627 UPDATE

You can test exclusion script logic in your email by like this:


if AttributeValue("Campaign") == "Campaign One" 
   OR rowcount(lookuprows("YOURDENAME","Email", AttributeValue("emailaddr"))) > 1 then
  set @excluded = "true"
  set @excluded = "false"

output(concat("<br>excluded: ", @excluded))


Once you've achieved the desired results, move what's between the if and then to your Exclusion Script.

  • If I use this logic, then it'll exclude contacts with "Campaign One", which is not the intent since this is "Exclusion Script", right?
    – Farrell
    Jun 27, 2022 at 3:47
  • I'm just providing an approach. I'll leave the criteria up to you. I've updated my answer with an example for testing in the email -- outside of the send definition. I find it easier to start there. Jun 27, 2022 at 13:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .