Is there a way to reference the value of a variabl...
# advancedpdf
r
Is there a way to reference the value of a variable before that value is defined? Example:
Copy code
<#assign pickTicketValue = 0>
<div>Pick Ticket Value: ${pickTicketValue}</div>
<#list record.item as item>
  <#assign pickTicketValue += item.amount>
</#list>
during printing, "Pick Ticket Value: 0" comes out, since it's following scripting and being assigned before being totalled. So is there a way to get that value, or is the only way to create a second loop of
record.item
above the first to just get the value, and then iterate over that same
record.item
again to actually print it on the PDF?