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",adam@gmail.com))> 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",adam@gmail.com) Attribute or Field Name: adam@gmail.com Invalid Content >>> ROWCOUNT(LOOKUPROWS("resulting AS FA", "Email",adam@gmail.com))

  • If my answer helped, please mark it as accepted so others can easily see this has been resolved. Thank you! – Markus Slabina Sep 9 '17 at 13:09
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", "adam@gmail.com"))> 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.