Skip to content

Instantly share code, notes, and snippets.

@wvpv
Created July 30, 2017 23:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvpv/cbcb27cbcf490d61577e21c2f90b0d0a to your computer and use it in GitHub Desktop.
Save wvpv/cbcb27cbcf490d61577e21c2f90b0d0a to your computer and use it in GitHub Desktop.
%%[
var @rows, @row, @rowCount
var @lookupValue
set @lookupValue = "whee"
set @rows = LookupRows("DataExtensionName","LookupColumn", @lookupValue)
set @rowCount = rowcount(@rows)
if @rowCount > 0 then
var @DEColumn1, @DEColumn2
set @row = row(@rows,1) /* get row #1 */
set @DEColumn1 = field(@row,"DEColumn1")
set @DEColumn2 = field(@row,"DEColumn2")
]%%
DEColumn1 is %%=v(@DEColumn1)=%%, DEColumn2 is %%=v(@DEColumn2)=%%
%%[ else ]%%
No rows found
%%[ endif ]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment