i am trying to show meeting details of a record on
Condition-1 meetingtype is "on"
Condition-2 if assignedsaleofficecode is empty then look for saleofficecode
this is the dataextension link https://docs.google.com/spreadsheets/d/1siITSm6wADg_DJ66xjSb-NVIBcdsU6zuru8vMxZgtlY/edit?usp=sharing
Below code works correctly for 1st record but for 2nd record its not working(showing meetings of 1st records).where 2nd records meeting type is "off" so it should show content-2 which is in else part. please suggest where this mistake in my code.
%%[
/* retrieve values */
set @SO = AttributeValue("SalesOffice")
set @AO = AttributeValue("Assignedsaleoffice")
if Empty(@AO) then
set @ovalue= @SO
SET @rs = LookupOrderedRows("simpletest",5,"MeetingDate Asc","SalesOffice",@ovalue,"MeetingType","on")
else
set @ovalue= @AO
Set @rs = LookupOrderedRows("simpletest",5,"MeetingDate Asc","Assignedsaleoffice",@ovalue,"MeetingType","on")
Endif
set @rowCount = rowcount(@rs)
if @rowCount > 0 then
for @i = 1 to @rowCount do
var @meetingDate, @MeetingID, @MeetingURL
SET @row = Row(@rs,@i)
SET @meetingDate = field(@row,"MeetingDate")
SET @MeetingID = field(@row,"MeetingID")
infomeetingId=',@MeetingID)
if (@meetingDate > Now()) Then
]%%
<b>%%=Field(@row,"Program")=%%</b>
<b>%%=Format(@meetingDate,"MM/dd/yyyy")=%%</b>
<b>%%=Field(@row,"MeetingStartTime")=%%</b>
<b>%%=Field(@row,"MeetingType")=%%</b>
<b>%%=Field(@row,"FirstName")=%%</b>
%%[
endif
next @i
]%%
%%[
else
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td>
Content-2
</td>
</tr>
</tbody>
</table>
endif
]%%