0

We want send to an email to two seperate data extensions at once (with dedupe), the email needs to pull data using AMPscript from those two data extensions.

We have tried using the Lookup() function, and this works well for one data extension but as soon as we try adding in the AMPScript for the second data extension it is unable to generate the email.

Our code is as below:

%%[
Var @subkey
Set @subkey = _SubscriberKey
Set @FPP1 = Lookup("PastWinnersRacing","FPP_RUNNER_NAME1","Subscriber Key",@subkey)
Set @SFPP1 = Lookup("PastWinnersSport","PARTICIPANT1","Subscriber Key",@subkey)
]%%

Any help is appreciated, Cheers

  • Are you getting any error? Does second DE 'PastWinnersSport' is contain any matching subscriber records? – Palash Rai Feb 3 '16 at 6:43
  • Please provide any error code on this - did you check to make sure that the subkey exists in each? I believe a lookup that returns null may cause an error. – Gortonington Feb 3 '16 at 15:10
  • When trying to preview the email the only error we get is "Unable to generate preview." Both data extensions have correct records in them, and are matched by subscriber keys. – CyrisXD Feb 3 '16 at 21:05
0

Do both Data Extensions have same fields? If you use one content for this send you might be referencing field that doesn't exist in targeted DE. For ex:
DE 1 fields: [Field 1]
DE 2 fields: [Field 2]

%%[
VAR @field1
SET @field1 = [Field 1]
]%%

This will work for DE 1 but will produce error for DE 2.

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.