0

I am attempting to write AMP Script for an exclusion of certain emails in an DE. Now this DE users subscriber key though. I am not able to perform a send. I recieve the following error msg for the simple amp script:

ROWCOUNT(LOOKUPROWS("resulting AS FA", "Email",[email protected]))> 0

where "resulting AS FA" = DE name and email is the DE field label and email is the physical email address ID

I have also attempted to use the subscriber key/which is our contact Key 00Q4100000UP3i9EAD, yet I am getting errors.

ROWCOUNT(LOOKUPROWS("resulting AS FA", "Email",_00Q4100000UP3i9EAD))> 0

There was an error sending this Email.
Exclusion filter validation failed: Exclusion filter is invalid. Error 1 Invalid Function Call The specified attribute or custom object field name was not found for this client. Function Call: LOOKUPROWS("resulting AS FA", "Email",[email protected]) Attribute or Field Name: [email protected] Invalid Content >>> ROWCOUNT(LOOKUPROWS("resulting AS FA", "Email",[email protected]))

1
  • If my answer helped, please mark it as accepted so others can easily see this has been resolved. Thank you! Sep 9, 2017 at 13:09

1 Answer 1

2

The problem is, that you didn't enter the email address or subscriber key in double quotes and therefore it is interpreted as AMPscript expression which it isn't.

ROWCOUNT(LOOKUPROWS("resulting AS FA", "Email", "[email protected]"))> 0

However usually you shouldn't check for a specific email address in an exclusion script as you wouldn't send any email if the specified address is on the list. If you like to suppress sending to email addresses that are on this data extension you could use the following script:

ROWCOUNT(LOOKUPROWS("resulting AS FA", "Email", EMAIL_ADDR))> 0

In case of the above script the email address of the subscriber to evaluate for send is checked against your exclusion data extension then. If you like to use the subscriber key for a check you need to use _SubscriberKey instead of EMAIL_ADDR.

You must log in to answer this question.

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