So I have a sendable data extension for an email, for which I'm wanting to input a Subject with dynamic content. For example IF Customer_Region is US then SET Subject = "Hi @First_Name, how are the states?"

I've got the First_Name declared in the block in the top of the email, and have @Subject in the Subject line. However, whenever I test this, it shows Hi @First_Name, are the states? instead of the person's actual first name.

Am I missing something here? Can you put a dynamic variable from a data extension inside a SET statement?

1 Answer 1


Your @First_Name variable's being used inside quotations, so it interpreted as a string and not being substituted. Build your Subject variable using Concat().

Email Body

    VAR @Subject
    SET @First_Name = AttributeValue('MyFirstNameFieldFromSendableDE')
    IF Customer_Region == 'US' THEN
        SET @Subject = CONCAT('Hi ',@First_Name,', how are The States?')
        SET @Subject = CONCAT('Hi ',@First_Name,', Lucky You!')



You must log in to answer this question.

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