I am trying to use a non-sendable data extension as a source for building emails more easily. My exact steps:
I uploaded a .csv file with 5 columns (ProductName, Category, SKU, Price, and OrderFormat) and 9 rows (first row has headers, no special characters, very simple, OrderFormat column contained 4 different last names- one per row). I was following the steps outlined in this previous question. Here is my code:
%%[
VAR @catalog, @row1, @address
Set @address = AttributeValue('LastName')
Set @catalog = LookupRows('Catalog_DE', 'OrderFormat', @address)
Set @row1 = Row(@catalog, 1)
]%%
%%= v(@row1) =%%
I am sending this to a data extension with 4 subscribers, and each of their last names appear twice per row in the catalog data extension. When I test the email I get the following output=
System.Data.DataRow
What am I doing wrong?
Also, is it possible to use a non sendable data extension as a source for an email without having to match it to the data extension you are sending to? Ultimately we want to be able to upload a catalog in a .csv file and then just output the values.
UPDATE:
I updated my code after reading EazyE's answer:
%%[
%%[
VAR @catalog, @row1, @address
SET @address = AttributeValue('LastName')
SET @catalog = LookupRows('DE_Catalog','OrderFormat', @address)
SET @row1 = Row(@catalog, 1)
]%%
%%= Field(@row1, 'ProductName') =%%
This code works great for when I want to personalize my email specific to each subscriber. However I also want to not have to personalize all emails I send. The only workaround that I have found was through changing the "OrderFormat" column's values to all 'X' and altering the code:
%%[
VAR @catalog, @row1, @address
SET @address = 'X'
SET @catalog = LookupRows('DE_Catalog','OrderFormat', @address)
SET @row1 = Row(@catalog, 1)
]%%
%%= Field(@row1, 'ProductName') =%%
How can this be done?