deliverRowNumber

Add deliverRowNumber to the @list tag to enable advanced scripts to distinguish individual rows in the data table.

Use the output of deliverRowNumber and the script logic to manipulate the display and organization of rows and cells in the table.

Add deliverRowNumber to the @list tag as you would add a personalization field. It tracks how many times the script iterates through the dimension table. By default, it always returns a number so you do not need add it to the @list tag using the "number format.

Use deliverRowNumber with the following syntax, where row is any loop variable.

<@list dimension="<dimension table>"; row>
     ${row.deliverRowNumber}
</@list>

The following example shows how to use deliverRowNumber to define different background colors for rows in the data table.

<@list>

<@if ((row.deliverRowNumber%2)==1))><tr bgcolor=Odd row color>
Insert content</tr></@if>
<@if ((row.deliverRowNumber%2)==0))><tr bgcolor=Even row color>
Insert content</tr></@if>
               
</@list>