Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

arnaudGithub commented Mar 21, 2017

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

@wvpv

This comment has been minimized.

Copy link
Owner 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

This comment has been minimized.

Copy link
Owner 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