Last active
March 28, 2017 17:10
-
-
Save katydorjee/ae2b05411227148a3287c158f5f13e79 to your computer and use it in GitHub Desktop.
Lookup Rows from a Data Extension - Ampscript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%[ | |
SET @query = "Query text" | |
SET @resultSet = LookupRows("Data Extension name","Field name for matching condition", @query) | |
IF RowCount(@resultSet) > 0 THEN | |
SET @row = row(@resultSet,1) | |
SET @Field1 = Field(@row,"FieldName1") | |
SET @Field2 = Field(@row,"FieldName2") | |
SET @Field3 = Field(@row,"FieldName3") | |
ENDIF | |
]%% | |
<!-- Print the result values --> | |
%%=v(@Field1)=%% <br> | |
%%=v(@Field2)=%% <br> | |
%%=v(@Field3)=%% <br> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment