Question
Loop through data page in Custom Html Section
Hi,
We have a requirement wherein, we need to have a section with grid repeat layout called in email body. Tried using insert section in email corrrespondance rule, but when the mail is received the grid format is not available as it is in UI. So trying to create a custom html section, where i can loop through the data page which loads the grid repeat layout . But I'm not getting the values for grid. PFB the code used. Is there any alternative way, we can call the data page ?
<table style="width:100%">
<tr>
<th>Name</th>
<th>Count</th>
</tr>
<pega:forEach name="D_CustomerDetails.pxResults">
<tr>
<td><p:r n="$THIS.Name" m="literal"/></td>
<td><p:r n="$THIS.pySummaryCount(1)" m="literal"/></td>
</tr>
</pega:forEach>
</table>
Thanks,
Mirunalene
***Edited by Moderator Marissa to update categories***
Hi Mirunalene,
There doesn't seem to be anything wrong with your code.
I used your code locally to test(modified it slightly to suit my config)....
<table style="width:100%">
<tr>
<th>ID</th>
<th>Status</th>
</tr>
<pega:forEach name="D_MyWorkList.pxResults">
<tr>
<td><p:r n="$THIS.pzInsKey"/></td>
<td><p:r n="$THIS.pyStatusWork"/></td>
</tr>
</pega:forEach>
</table>
It displays properties as expected (see attached image)
Can you check some things on your side -
1. Have you declared the D_page and pxResults on the Pages & Classes tab on the rule form where you have your JSp/HTML code?
2. What kind of property is pySummaryCount(1)? Can you remove this and try simple scalar properties as a test?
Thanks,
Sunny