In Marketing Cloud, there are several ways to retrieve external data with AMPscript inside your email, landing page or SMS message. Here are few ways to go about it.
Suppose you have a Data Extension that contains these rows (and is not your sending audience):
LookupColumn | DEColumn1 | DEColumn2 |
---|---|---|
whee | Neo | Keanu Reeves |
whee | Trinity | Carrie-Anne Moss |
whee | Morpheus | Laurence Fishburne |
whoa | Agent Smith | Hugo Weaving |
Lookup value of single column value from a certain row
Output
DEColumn1 is Agent Smith
Lookup multiple column values from a single row
Output
DEColumn1 is Neo, DEColumn2 is Keanu Reeves
Lookup multiple column values from multiple ordered rows
Output
Row 1, DEColumn1 is Trinity, DEColumn2 is Carrie-Anne Moss
Row 2, DEColumn1 is Neo, DEColumn2 is Keanu Reeves
Row 3, DEColumn1 is Morpheus, DEColumn2 is Laurence Fishburne
For further reference:
Updates
- 2017-10-19 – Added example Data Extension and output
- 2018-08-24 – update reference links
(Visited 23,443 times, 4 visits today)