Quantcast
Channel: Active questions tagged ampscript - Salesforce Stack Exchange
Viewing all articles
Browse latest Browse all 359

multiple DE in cloudpage

$
0
0

I am creating a cloud page and I'm new to amp script and no programming knowledge at all. I have 2 DE, is possible to call 2 DE in one cloudpage?

<table><thead><tr><th>Time</th><th>Campaign Name</th><th>Campaign ID</th><th>Total leads </th><th>Total leads send today </th></tr></thead><tbody><tr> %%[   var @rows, @rowcount, @i, @row, @latest_sendDateTime, @campaignName, @campaignId, @sendStatus, @rowCount, @totalSendCount   set @rows = lookuprows("Prod_CampaignTracker_checking","sendStatus","Sent")   set @rowCount = rowcount(@rows)   if @rowCount > 0 then     for @i = 1 to 20 do    set @row = Row(@rows, @i)    set @latest_sendDateTime = field(@row, "latest_sendDateTime")    set @campaignName = field(@row, "campaignName")    set @campaignid = field(@row, "campaignId")    set @totalSendCount = field(@row, "totalSendCount") ]%%<td>%%=v(@latest_sendDateTime)=%%</td><td>%%=v(@campaignName)=%%</td><td>%%=v(@campaignId)=%%</td> <td>%%=v(@totalSendCount)=%%</td></tr>                          %%[            next @i            endif            ]%%<br>   </tbody><br></table><h2>Daily Send</h2><table><thead><tr><th>Time</th><th>Campaign Name</th><th>Campaign ID</th><th>Total leads </th><th>Total leads send today </th></tr></thead><tbody><tr> %%[   var @rows, @rowcount, @i, @row, @sendDatetime, @campaignName, @campaignId, @sendStatus, @rowCount   set @rows = lookuprows("Prod_CAMPAIGN_TRACKER_sample","sendStatus","Sent")   set @rowCount = rowcount(@rows)   if @rowCount > 0 then     for @i = 1 to 20 do    set @row = Row(@rows, @i)    set @sendDatetime = field(@row, "sendDatetime")    set @campaignName = field(@row, "campaignName")    set @campaignid = field(@row, "campaignId")    set @sendStatus = field(@row, "sendStatus") ]%%<td>%%=v(@sendDatetime)=%%</td><td>%%=v(@campaignName)=%%</td><td>%%=v(@campaignId)=%%</td> <td>%%=v(@totalSendCount)=%%</td></tr>                          %%[            next @i            endif            ]%%<br>   </tbody><br></table>

Error Message: "Invalid index (parameter 2) passed to Row function. Index must be less than or equal to the row count. Index Value: 20 Row Count: 19 Function: Row(@rows, @i)"

Description: "ExactTarget.OMM.FunctionExecutionException: Invalid index (parameter 2) passed to Row function. Index must be less than or equal to the row count. Index Value: 20 Row Count: 19 Function: Row(@rows, @i) Error Code: OMM_FUNC_EXEC_ERROR - from Jint "


Viewing all articles
Browse latest Browse all 359

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>