Hi veerareddyc1015,
The <Name> elements under <employeeName> are treated as an array in the rtEvent context. We can iterate through them using a while loop and render the values in a table format in the email HTML.
Please find the sample code below:
<table border="1" cellpadding="6" cellspacing="0">
<tr>
<th>S.No</th>
<th>Employee Name</th>
</tr>
<%
var i = 0;
var empNames = rtEvent.ctx.employeeName.Name;
while (i < empNames.length) {
%>
<tr>
<td><%= i + 1 %></td>
<td><%= empNames[i] %></td>
</tr>
<%
i++;
}
%>
</table>This approach correctly accesses the rtEvent context (rtEvent.ctx.employeeName.Name) and dynamically displays all employee names in a table, even if the number of <Name> nodes changes.
Hope this helps.
Thanks,
Giriprasath B