Jared Fraley
09/05/2022, 3:01 PMDavid B
09/06/2022, 9:36 PM<#list>
tag and what's inside itJared Fraley
09/07/2022, 5:36 PM<#if salesorder.item?has_content>
<table class="itemtable" style="width: 100%; margin-top: 10px;">
<thead>
<tr>
<th colspan="12">${salesorder.item[0].item@label}</th>
<th align="right" colspan="4">${salesorder.item[0].quantityordered@label}</th>
<th align="right" colspan="4">${salesorder.item[0].quantityremaining@label}</th>
<th align="right" colspan="4">${salesorder.item[0].quantity@label}</th>
</tr>
</thead>
<#list salesorder.item as tranline><tr>
<td colspan="12"><span class="itemname">${tranline.item}</span><br />${tranline.description}</td>
<td align="right" colspan="4">${tranline.quantityordered}</td>
<td align="right" colspan="4">${tranline.quantityremaining}</td>
<td align="right" colspan="4">${tranline.quantity}</td>
</tr>
</#list></table>
</#if>
Jared Fraley
09/07/2022, 7:07 PMThe template cannot be printed due to the following errors: Error on line 145, column 26 in template. Detail... The following has evaluated to null or missing: ==> salesorder.item[0] [in template "template" at line 145, column 28] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${salesorder.item[0].item@label} [in template "template" at line 145, column 26] ---- Error on line 146, column 39 in template. Detail... The following has evaluated to null or missing: ==> salesorder.item[0] [in template "template" at line 146, column 41] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${salesorder.item[0].quantityordered@... [in template "template" at line 146, column 39] ---- Error on line 147, column 39 in template. Detail... The following has evaluated to null or missing: ==> salesorder.item[0] [in template "template" at line 147, column 41] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${salesorder.item[0].quantityremainin... [in template "template" at line 147, column 39] ---- Error on line 148, column 39 in template. Detail... The following has evaluated to null or missing: ==> salesorder.item[0] [in template "template" at line 148, column 41] ---- Tip: It's the final [] step that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${salesorder.item[0].quantity@label} [in template "template" at line 148, column 39] ---- Please contact your administrator.
David B
09/09/2022, 8:51 AM??
might be the wrong thing to use (salesorder.item might be an empty list, so passes ??
but fails ?has_content
)
I must ask, should you instead be using record.item
instead of salesorder.item
?Jared Fraley
09/09/2022, 4:07 PM