I am assisting with a MC project and am having conceptual issues with platform when it comes to exclusion scripts.

When in a Journey and you have a "Send Email" action open there is a "Exclusion Script" text input for excluding records.

The script I want to exclude is pretty straight forward

Comm_Preferences == "No" || 
(NOT(ISNULL(DSS_End)) && DSS_End <= NOW())

When I Activate the Journey I get an error

ISNULL(EXPDAT) Attribute or Field Name: EXPDAT Invalid Content

I also have this script saved as a DataExtension and saw a post about linking the data extension to the email action, but I'm not understanding how that "link" works.

(ROWCOUNT(LOOKUPROWS("ExclusionDE", "EmailAddress", Email_Address)) > 1)

I've never worked on MC and appreciate any advice.

1 Answer 1


The EXPDAT, Comm_Preferences and DSS_End are Profile Attributes or (more likely) Data Extension columns that are in the send context for your message. If any one of those do not exist when pairing the audience and your message, you'll get an error like the one you described.

Same thing in the second example. The email_address is a DE column or Profile Attribute and must exist in order for the AMPScript to evaluate.

The remedy is to ensure that the entry event Data Extension (or API call) for your Journey includes these fields/columns.

An alternative is to use the AttributeValue() function which will return an empty string if the attribute/column doesn't exist:

(NOT(ISNULL(AttributeValue("EXPDAT"))) && AttributeValue("EXPDAT") <= NOW()) 
|| AttributeValue("Comm_Preferences") == 'No" 
|| (NOT(ISNULL(AttributeValue("DSS_End"))) && AttributeValue("DSS_End") <= NOW())

In the second script you can fall back to using the emailaddr personalization string, which exists for every email send:

(ROWCOUNT(LOOKUPROWS("ExclusionDE", "EmailAddress", emailaddr)) > 1)
  • Hi Adam! Thanks for responding. I was able to activate the Journey, but now the records are not receiving emails. I have checked that the records DO NOT match the exclusion criteria. Do you have any idea why they would not send? Thanks! Mar 12, 2018 at 20:46
  • Can you update your question and include details about your entry event data extension (or method) -- like field names and types? Mar 12, 2018 at 22:08
  • We figured it out. You guided us in the right direction. We had to use (ROWCOUNT(LOOKUPROWS("ExclusionDE", "EmailAddress", AttributeValue("EmailAddress"))) > 1) Mar 13, 2018 at 17:06

You must log in to answer this question.

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