I'm just starting out with Exact Target and Ampscripts, but it's boggling my brain.

I've uploaded a data extension which has two columns; one showing a country name, and the other a URL to a youtube video about that country.

I'm trying to put an AMPscript into an email which will match the email recipients country of interest in our SalesForce database with a country name in the data extension and then place the appropriate URL in the body of the email.

The title fields in the Data Extension are:


And the title field in the SalesForce report is:

Study Where

So, the code I've created looks like this:

<-------URL correction for video study location ------->


Var @vidurl, @studycity

SET @studycity = [Study Where]
SET @vidurl = Lookup("VideoCorrection_Italy_BrochureDownload","DEurl","Studycity","@studycity")


And I use this as the href:

<a "href="%%=REDIRECTTO(@vidurl)=%%">link</a>

But for some reason, the link is not working properly. There is a link there as a result of the Ampscript, but it's not taking me anywhere.

Really not sure what I'm doing wrong :/

  • 1
    The question title is not really clear !
    – SF_user
    Commented Nov 19, 2014 at 9:33
  • Sorry, also should say it's my first time using the Stack Overflow. Not sure how to edit the question title. Apologies.
    – Alan MX
    Commented Nov 19, 2014 at 9:35
  • If you need some concise lookup examples, check out my blog post: sprignaturemoves.com/ampscript-lookup-examples Commented Nov 19, 2014 at 12:16

1 Answer 1


Try removing the double quotes from around the @studycity variable in your lookup function.

    SET @studycity = AttributeValue("Study Where")
    SET @vidurl = Lookup("VideoCorrection_Italy_BrochureDownload","DEurl","Studycity",@studycity)
<a href="%%=redirectto(@vidurl)=%%">link</a>

You must log in to answer this question.

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