0

In the ampscript content if I set to List and not DE like this “set @Program =v(ProgramOfInterests)” and preview test with a list. this will bring up content data related to the correct program.

If I change this to “set @Program =v(Lead:Global_Program_of_Interest_1__c) ” and use the DE “Leads from High School Visits ”

It does not work and this is where I need

I've added the email template code below and this is my Data Extension that is created by my Journey "Leads from High School Visits":

Lead:Campaign_Event_Type

__cLead:High_School_Name

__cLead:FirstName

Lead:LastName

Lead:Global_School_Program_of_Interest_1
__cLead:Global_Program_of_Interest_1__c High School/College Visit St. Michael Catholic Secondary SchoolTest 1 RobertwynterSchool of Media, Art & DesignBroadcasting - Radio & Contemporary Media

AMPScript

%%[ var @Program,@url, @ColumnCredential2, @ColumnSemester2, @ColumnProgramCode, @ColumnSchool, @ColumnLeft, @ColumnRight, @ColumnCredential, @ColumnSemester, @ColumnLocation, @ColumnTitleDescription, @ColumnDescription, @ColumnHeaderPic, @ColumnMiddlePic, @ColumnBotPic, @ColumnQuote, @ColumnQuoteFrom, @ColumnQuoteFromPosition

    set @Program =v(Lead:Global_School_Program_of_Interest_1__c)
    set @ColumnProgramCode = Lookup("Program_Interest", "ProgramCode", "ProgramOfInterest", @Program)
    set @url = Concat("http://www.durhamcollege.ca/",@ColumnProgramCode)
    set @ColumnSchool = Lookup("Program_Interest", "SchoolProgram", "ProgramOfInterest", @Program)
    set @ColumnCredential= Lookup("Program_Interest", "CredentialAwarded", "ProgramOfInterest", @Program)
    set @ColumnSemester = Lookup("Program_Interest", "NumberOfSemesters", "ProgramOfInterest", @Program)
    set @ColumnCredential2= Lookup("Program_Interest", "CredentialAwarded2", "ProgramOfInterest", @Program)
    set @ColumnSemester2 = Lookup("Program_Interest", "NumberOfSemester2", "ProgramOfInterest", @Program)
    set @ColumnLocation= Lookup("Program_Interest", "CampusLocation", "ProgramOfInterest", @Program)
    set @ColumnTitleDescription = Lookup("Program_Interest", "TitleDescription", "ProgramOfInterest", @Program)
    set @ColumnDescription = Lookup("Program_Interest", "Description", "ProgramOfInterest", @Program)
    set @ColumnHeaderPic= Lookup("Program_Interest", "HeaderImage", "ProgramOfInterest", @Program)
    set @ColumnMiddlePic = Lookup("Program_Interest", "MiddleImage", "ProgramOfInterest", @Program)
    set @ColumnBotPic = Lookup("Program_Interest", "BottomImage", "ProgramOfInterest", @Program)
    set @ColumnProgramCode = Lookup("Program_Interest", "ProgramCode", "ProgramOfInterest", @Program)
    set @ColumnQuote = Lookup("Program_Interest", "Quote", "ProgramOfInterest", @Program)
    set @ColumnQuoteFrom = Lookup("Program_Interest", "QuoteFrom", "ProgramOfInterest", @Program)
    set @ColumnQuoteFromPosition = Lookup("Program_Interest", "QuoteFromDescription", "ProgramOfInterest", @Program)
    set @ColumnLeft = Lookup("Program_Interest", "LeftSideHTML", "ProgramOfInterest", @Program)
    set @ColumnRight = Lookup("Program_Interest", "RightSideHTML", "ProgramOfInterest", @Program)
    ]%%

    <table border="0" cellpadding="0" cellspacing="0" style="margin: 0px; padding: 0px" width="100%">
        2
         /tr></table>
  • 1
    You've switched to DEs and fields with spaces and colons in their names. Have you tried encapsulating their names with []? Also look at AttributeValue() to retrieve what you want from the DE. – Macca Jul 18 '17 at 16:00
  • OMG. I could hug you right now. I've been emailing support back and forth for 3 days and everything he suggested didn't work. You look at it, for what a few minutes? The [ ] was the key. the only issue I have now is that it's not producing the correct font and color. thanks again Andrew. My stress level just went down a few notches – Robert Wynter Jul 18 '17 at 17:58
  • Happy to hear, Robert. I've certainly been in your boots. Marketing Cloud's a frustrating thing. But pretty liberating, too. There's not so much you can't do (with a little creativity). Be creative. – Macca Jul 20 '17 at 14:24
0

Where the field you want to refer to in your AMPScript contains non-Alphanumeric characters or spaces, encapsulate the field name in square brackets "[my: field]" or initiate an AMPScript variable using AttributeVale("my: field").

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.