I am trying to pull some data from different data extensions into an email. The data extension I am sending to only has 3 attributes; Event ID, uuid (subscriberkey), and Email Address. The name of the data extension I am sending to is called STG_Registered_Customers.
In my email I am trying to pull in the Event Name, Event Start Date, and Event ID. All three of those attributes are in a data extension called OnlineEvent. So the common data point between the data extension OnlineEvent and STG_Registered_Customers is the Event ID.
When going into preview and test, then selecting a record from the STG_Registered_Customers data extension to preview from I get the following error message: The subscriber preview failed to generate. Review the details, correct all issues, and try again. Invalid index (parameter 2) passed to Row function. Index must be greater than 0. Index Value: 0 Function: Row(@Event, 0)
Here is the AMPscript I have in the email:
%%[
Var @EventName, @EventStartDate, @EventID, @SubscriberKey
SET @SubscriberKey = AttributeValue("_subscriberkey")
SET @EventID = Lookup("STG_Registered_Customers","Event ID","uuid",@SubscriberKey)
SET @EventStartDate = Lookup("OnlineEvent","Event start date","Event ID",@EventID)
SET @EventName = Lookup("OnlineEvent","Event Name","Event ID",@EventID)
]%%
I am pretty new to using AMPscript and I can't seem to figure out what is causing it to not find a value. Is there some comma or format issue I have, or is there something else that is going on that I've failed to see?
Row(@Event,0)
- check your text version as well. If you accidently disconnected the 2, the text version may have old code in it