I have a column called First Name in Data Extension TriggeredSendDataExtension - 20160917_111231. I am trying to print FromEmail from the data extension row by passing the first name as the send time parameter. But it does not looks to be working. I am keeping this in Email Template.

Set @FromEmail = Lookup("TriggeredSendDataExtension - 20160917_111231", "FromEmail", "First Name", %%First Name%%)

%%=v(@FromEmail )=%%

dataExtension - TriggeredSendDataExtension - 20160917_111231
returnColumn - FromEmail
matchColumn - First Name
value - %%First Name%%

Also I have tried the below pattern. It is also does not seem to be working.

 SET @MYSUB= %%Subject%%
 Set @Subject= Lookup("TriggeredSendDataExtension - 20160917_111231", "FromEmail", "Subject", @MYSUB) ]%%


With this I am getting

Error 1: Script SET Statement Invalid
An error occurred when attempting to resolve a script expression. See inner exception for detail.
Script Expression: %%Subject%%
MemberID: 7273985
JobID: 0

How do I resolve the issue?


You can not pass %%First Name%% directly in any LookUp function.

I would suggest you to use AttributeValue AmpSCript function and initialize First Name in variable.

SET @FirstName = AttributeValue("First Name")
SET @FromEmail = Lookup("TriggeredSendDataExtension - 20160917_111231", "FromEmail", "First Name", @FirstName)

| improve this answer | |

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.