0

The below code is a simplified version of my code which works (Landing Page), it includes all the rows I want, however, when I parse the row of data to "ExtranetApprovals" and come back to this page, I want the row to have disappeared because the Email Address will then be present in the "ExtranetApprovals" data extension. I have included an idea of what I want to include below this code, but would happily take suggestions!

I have tried a few options but they have all produced errors.

%%[
Set @dataExtensionName = "Extranet_Config"
set @rows = LookupOrderedRows("ExtranetRegistrations",@numRowsToReturn,"Date asc","Country",@SalesRegion)
set @rowCount = rowcount(@rows)
]%%

%%[

if @rowCount > 0 then

 for @i = 1 to @rowCount do

set @row = row(@rows,@i)         
set @EmailRegistered = field(@row,"EmailRegistered")
set @ApprovalLookup = LookupRows("ExtranetApprovals","EmailRegistered",@EmailRegistered)
set @ApprovalCount = rowcount(@ApprovalLookup)

if @i == 1 then
outputline(concat("<ul>"))
endif

]%%

/* ROW OF DATA */

%%[ 

if @i == @rowcount then
outputline(concat("</ul>"))
endif

next @i ]%%

%%[ else ]%%

No rows found

%%[ endif ]%%

I want to include this:

if @ApprovalCount == 0 then 

/* SHOW ROW */

endif

1 Answer 1

0

I solved it! Thank you to anyone who looked :)

%%[
Set @dataExtensionName = "Extranet_Config"
set @rows = LookupOrderedRows("ExtranetRegistrations",@numRowsToReturn,"Date asc","Country",@SalesRegion)
set @rowCount = rowcount(@rows)
]%%

%%[

if @rowCount > 0 then

 for @i = 1 to @rowCount do

set @row = row(@rows,@i)         
set @EmailRegistered = field(@row,"EmailRegistered")
set @ApprovalLookup = LookupRows("ExtranetApprovals","EmailRegistered",@EmailRegistered)
set @ApprovalCount = rowcount(@ApprovalLookup)

if @i == 1 then
outputline(concat("<ul>"))
endif

]%%

%%[ if @ApprovalCount == 0 then ]%%

/* ROW OF DATA */

%%[ else ]%%

%%[ endif ]%%

%%[ 

if @i == @rowcount then
outputline(concat("</ul>"))
endif

next @i ]%%

%%[ else ]%%

No rows found

%%[ endif ]%%

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .