I am new to AmpScript and am trying to figure out how to reference data from 1 data extension with data in another data extension. I created a Data Relationship between the two but am having trouble pulling that data into an email.
Our 1st data extension includes client_email_addr
(which is our primary key to email subscribers) and home_studio1
.
The 2nd data extension includes home_studio1
and studio_url
with home_studio1
set to the primary key.
I would like to reference the 2nd data extension 2017_Master Studio List
and when a customer's home_studio1
matches that list, display the coinciding studio_url
within and email.
I found the lookup function syntax Lookup(1, 2, 3, 4)
, where I believe I would structure it as such:
%%=Lookup('2017_Master Studio List','studio_url','home_studio1',?)=%%
But I'm not sure what the #4 is in the syntax if I'm simply trying to find matching values. If I were to specifically list each location as that 4th value, I would have 100s of rows of AmpScript which seems to defeat the purpose.
Am I on the right track here?