0

I've got 3 DE's say (DE1,DE2,DE3) which different attributes and a sendable-DE (master-DE) with Email column

I have to create an email which contains 3 tables (T1,T2,T3) and Insert the values in the DE's into these tables DE1 --> T1, DE2--> T2, DE3--> T3

here's the tricky part, all three DE have some common data, say person1 has data in DE1 and DE3 while Person2 might have data only in DE2.

When the mailer is sent, Person1 must receive an email with only tables T1 and T3 (T2 shouldn't be shown in the email)

Do tell me if this can be achieved using AMP script

1 Answer 1

0

Try something like the following:

%%[
    SET @de1Rows = LOOKUPROWS("DE1", "Email", _emailaddr)
    SET @de2Rows = LOOKUPROWS("DE2", "Email", _emailaddr)
    SET @de3Rows = LOOKUPROWS("DE3", "Email", _emailaddr)

    IF ROWCOUNT(@de1Rows) > 0 THEN
        FOR @i = 1 TO ROWCOUNT(@de1Rows) DO
            SET @field1 = FIELD(ROW(@de1Rows,@i),"field name")
]%%
<output your table HTML> Use %%=V(@field1)=%% etc
%%[
        NEXT @i
    ENDIF

    /* repeat for the other DEs */
]%%

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