Schwifty
04/21/2024, 8:04 PMaddSearchResults
, I am able to access the fields after the <#list>
but not prior. No errors, just no data showing up.
How would I got to accessing fields? Below, the entityid isn’t pulling the record, _po_receiving_ is my templateName
<table>
<#list po_receiving![]>
<th>${po_receiving.entityid}</th>
<#assign totalQtyRcvd = 0>
<#assign totalWeightRcvd = 0>
<tr>
<th>Date</th>
<th>Document Number</th>
<th>Item</th>
</tr>
<#items as ir>
<tr>
<td align="left">${ir.trandate}</td>
<td align="left">${ir.tranid}</td>
Stefan Reeder
04/21/2024, 11:23 PMSchwifty
04/22/2024, 4:50 AMSchwifty
04/22/2024, 5:58 AMStefan Reeder
04/22/2024, 6:07 AM<#if po_receiving?has_content && po_receiving?size gt 0>
<p>Some header info on the first line only: ${po_receiving[0].tranid} ${po_receiving[0].trandate}</p>
</#if>
<#list po_receiving as items>
<table>
<#if po_receiving_index = 0>
<thead>
<tr>
<th>Heading 1</th>
<th>Heading 1</th>
</tr>
</thead>
<#/if>
<tr>
<td>${item.item}</td>
<td>${item.quantity}</td>
</tr>
<#else> <!-- this will catch occurences where there are no list items -->
... do stuff when there are no results
</#list>
</#list>
Stefan Reeder
04/22/2024, 6:10 AMStefan Reeder
04/22/2024, 6:12 AMSchwifty
04/22/2024, 6:18 AMStefan Reeder
04/22/2024, 6:39 AMStefan Reeder
04/22/2024, 6:39 AMStefan Reeder
04/22/2024, 6:39 AMStefan Reeder
04/22/2024, 6:39 AMStefan Reeder
04/22/2024, 6:39 AMSchwifty
04/22/2024, 6:53 AM