Expand my Community achievements bar.

Get ready! An upgraded Experience League Community experience is coming in January.

Need a some solution on while loop

Avatar

Level 3

Hi Team,

 

Can you please help me on writing the rtEvent expression with while loop to display in table format, for the below.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:nms:rtEvent">
<soapenv:Header/>
<soapenv:Body>
<urn:PushEvent>
<urn:sessiontoken>?</urn:sessiontoken>
<urn:domEvent>
<rtEventtype="Welcome_TTN" email="Veera@gmail.com" wishedChannel="email">
<ctx>
<employeeName>
<Name>Vinay</Name>
<Name>Veera</Name>
<Name>Vishal</Name>
<Name>Venkat</Name>
</employeeName>
</ctx>
</rtEvent>
</urn:domEvent>
</urn:PushEvent>
</soapenv:Body>
</soapenv:Envelope>

Thanks in Advance

Veera

1 Reply

Avatar

Community Advisor

Hello @veerareddyc1015,

 

something like this should work :

<table border="1" style="border-collapse: collapse; width: 100%;">
  <thead>
    <tr>
      <th style="text-align: left; padding: 8px;">Employee Name</th>
    </tr>
  </thead>
  <tbody>
    <% 
    // Iterate through each 'Name' node within the employeeName context
    for each(var employee in rtEvent.ctx.employeeName.Name) { 
    %>
      <tr>
        <td style="padding: 8px;"><%= employee %></td>
      </tr>
    <% } %>
  </tbody>
</table>

Br,