I have the following AMPscript code which should lookup some data based on the subscriber key:
%%[ var @rows, @row, @rowCount var @lookupValue set @lookupValue = AttributeValue("uuid") set @lookupValue = "_subscriberkey" set @rows = LookupRows("DE_Name","uuid", _Subscriberkey) set @rowCount = rowcount(@rows) if @rowCount > 0 then var @registrationDate, @purchaseDate set @row = row(@rows,1) set @registrationDate = field(@row,"registrationDate") set @purchaseDate = field(@row,"purchaseDate") ]%% registrationDate is %%=v(@registrationDate)=%%, purchaseDate is %%=v(@purchaseDate)=%% %%[ else ]%% No rows found %%[ endif ]%%
Normally I would expect the output from the registrationDate and purchaseDate, but it generates nothing but also doesn't give an error.
The following fields are included in the Data Extension which I'm retrieving the data from and sending to:
- CTN / Primary Key / Text
- uuid / Primary Key / Text
- registrationDate / Date
- purchaseDate / Date
- imageUrl / Text
- productUrl / Text
- sourceID / Text
For testing I only tried to fetch the dates with the AMPscript. The send relation is uuid with Subscriber Key. Some rows from the DE aren't in the all subscribers yet, but most of them are.
What am I doing wrong?