Skip to content

Instantly share code, notes, and snippets.

@wvpv
Last active October 19, 2017 19:23
Show Gist options
  • Save wvpv/af2e0a99381df6666242 to your computer and use it in GitHub Desktop.
Save wvpv/af2e0a99381df6666242 to your computer and use it in GitHub Desktop.
SFMC AMPScript Lookup value of single column value from a certain row
%%[
var @DEColumn1, @lookupValue
set @lookupValue = AttributeValue("lookupField") /* value from attribute or DE column in send context */
set @lookupValue = "whoa" /* or a literal value */
set @DEColumn1 = Lookup("DataExtensionName", "DEColumn1", "LookupColumn", @lookupValue)
]%%
DEColumn1 is %%=v(@DEColumn1)=%%
@arnaudGithub
Copy link

Hi,
Thanks for the example. I would like to know what "whee" refer into your DE?
Thanks!

@wvpv
Copy link
Author

wvpv commented Apr 13, 2017

It's just the key value I'm using to match a row in the DataExtensionName data extension.

@wvpv
Copy link
Author

wvpv commented Oct 19, 2017

I've updated the examples on my blog for reference: https://sprignaturemoves.com/ampscript-lookup-examples/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment