Skip to content

Instantly share code, notes, and snippets.

@wvpv
Created June 9, 2018 15:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvpv/5aec65e89817156da50162f1a66c35df to your computer and use it in GitHub Desktop.
Save wvpv/5aec65e89817156da50162f1a66c35df to your computer and use it in GitHub Desktop.
CNX18-ECAS-subscriberReferrals
%%[
var @sk, @rows, @row, @rowCount, @i
set @sk = AttributeValue("_subscriberkey")
set @rows = LookupRows("SubscriberReferrals", "SubscriberKey", @sk)
set @rowCount = rowcount(@rows)
if @rowCount > 0 then
]%%
<p>Your referrals</p>
<table border="1">
<tr>
<th>Name</th>
<th>Date</th>
</tr>
%%[
for @i = 1 to @rowCount do
var @referralDate, @referralName
set @row = row(@rows, @i)
set @referralName = field(@row,"referralName")
set @referralDate = field(@row,"referralDate")
]%%
<tr>
<td>%%=v(@referralName)=%%</td>
<td>%%=FormatDate(@referralDate,"s")=%%</td>
</tr>
%%[
next @i
]%%
</table>
%%[
endif ]%%
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment