2

I'm using exact target to send out an email. I have two data extensions in exact target called DEAllMembers and DESpecialMembers. Both data extensions have a field called email_address.

When crafting my email, I have a paragraph of text that I want show ONLY if the user's email address is in BOTH DEAllMembers and DESpecialMembers. I would like to use AMPScript to satisfy this objective. Is this possible? If so, how do I go about doing it?

1

This definitely possible. You would use a conditional statement as described in the documentation

%%[IF expression1 <comparison operator> expression2 THEN]%%
    [wrapped script or email content]
%%[ELSEIF expression1 <comparison operator> expression3 THEN]%%
    [wrapped script or email content]
%%[ELSE]%%
    [wrapped script or email content]
%%[ENDIF]%%

In your particular case you will also need a DataExtension AMPScript function as well.

Lookup("DEAllMembers","email_address","email_address", emailaddr)
Lookup("DESpecialMembers","email_address","email_address", emailaddr)

Your final AMP script would look something like this -

%%[
    SET @all    Lookup("DEAllMembers","email_address","email_address", emailaddr)
    SET @special    Lookup("DESpecialMembers","email_address","email_address", emailaddr)

    IF EMPTY(@all) AND EMPTY(@special) THEN
]%%

<p>Your content here</p>

%%[ENDIF]%%

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.