I have subscribers going into one data extension giving a value for a column. For example: data extension name "Foodie" column name "FoodID" with a number in that field, i.e. 1234.

I have another data extension that will have the definition of that value, example: data extension name "FavoriteFoods" columns "FavoriteFood" and "FoodID" indicating i.e. 1234 equals Bananas

I am trying to return the lookup value within an email but nothing is coming through here is my code:

%%[ VAR @FF, @FoodID SET @FoodID = [FoodID] SET @FF = Lookup("FavoriteFoods", "FavoriteFood", "FoodID", @FoodID) ]%%

and I use this: %%=v(@FF)=%%

1 Answer 1


Your lookup appears to be correct. I'd utilize the AttributeValue() function and output @FoodID, just to make sure it has a value:

VAR @FF, @FoodID
SET @FoodID = AttributeValue("FoodID")
SET @FF = Lookup("FavoriteFoods", "FavoriteFood", "FoodID", @FoodID)
FoodID: %%=v(@FoodID)=%%
<br>Favorite food: %%=v(@FF)=%%

Perhaps you can provide a brief sample of the the FavoriteFoods data -- including the data types of each column?

  • FavoriteFoods has two columns: FavoriteFood (text, it has a the word for the food, such as "Pizza") FoodID (number, has the number id for that food, such as "1111", also has the same FoodID value as in the "Foodie"DE.
    – Stacy
    Aug 13, 2015 at 16:11
  • Thanks @AdamSpriggs ! Still coming up blank. Would the location of the Data extension be a factor?
    – Stacy
    Aug 13, 2015 at 16:53
  • So @FoodID has a value? If the DE is in Shared Items, then you may need to include the ent. prefix on the DE name. Aug 13, 2015 at 16:58
  • Yeah, FoodID has a value. All columns from both Data Extensions do. 'm not sure if either DE is in Shared Items, I do know that they are not in the location, two different folders under "Data Extension" When the subscribers enter the info, I get the number (1111) but the name for that only lives in the other DE and the email would state something like "Your favorite food is: BANANAS" (i'm sure you knew this, just revisiting for my own benefit.)
    – Stacy
    Aug 13, 2015 at 17:14
  • So does the @FoodID have a value in your email? If you hardcode set @FoodID = 1111 in your email does it work? Aug 13, 2015 at 17:16

You must log in to answer this question.

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