Last active
October 6, 2017 11:08
-
-
Save wvpv/aef7dd777cbacec227c0 to your computer and use it in GitHub Desktop.
SFMC Lookup Data Extension Rows
This file contains 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
<script runat="server"> | |
Platform.Load("core", "1"); | |
var birthdayDE = DataExtension.Init("birthdayDE"); | |
var filter = { | |
Property: "EmailAddress", | |
SimpleOperator: "equals", | |
Value: "[email protected]" | |
}; | |
var data = birthdayDE.Rows.Retrieve(filter); | |
Write("<br>data.length: " + data.length); | |
if (data.length > 0) { | |
Write("<table border='1' cellpadding='2' cellspacing='3' style='border-collapse:collapse;'>"); | |
for (var i = 0; i <= data.length; i++) { | |
var d = data[i]; | |
Write("<tr>"); | |
for (var i in d) { | |
Write("<td>" + d[i] + "</td>"); | |
} | |
Write("</tr>"); | |
} | |
Write("</table>"); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment