Rows.Lookup
Returns columns that match the specified values
Rows.Lookup(1, 2, 3, 4)
Ordinal | Type | Description | |
---|---|---|---|
1 | string | Required | Columns to search for data |
2 | string | Required | Values uses in search |
3 | numeric | number of rows to return | |
4 | string | Order of rows to return |
This sample code returns all rows in birthdayDE with a value of 25 for Age.
This sample code returns the same rows in birthdayDE, but it limits the results to two rows and sorts the results by last name.
When initializing data extensions with Lookup() in an email, you must use the name of the data extension. When using the function in landing pages, you can use either the name or the external key of the data extension. Make the name and the external key the same value when creating the data extension to ensure you use the correct value at all times.