Hi everyone. when working with advanced pdf on a s...
# general
l
Hi everyone. when working with advanced pdf on a sales order, i tried to use ${record.salesteam.contribution} to access the value in the contribution field under the sales team sublist but nothing is returned. when i add the index ${record.salesteam[0].contribution}, the error below is returned. any idea on how to resolve?
👀 1
l
Two factors need to take into consideration, 1.) if it's a custom field you should add an If statement checking for nulls or missing: <#if record.salesteam.contribution?has_content> <h1>${record.salesteam.contribution} </h1> </#if> 2.) if you want to access an array member you should use the list tag <#list record.salesteam as item> item.contribution </#list> this will go through all the members in the array here is a simply cheat sheet for freemarker http://eriklievaart.com/cheat/java/other/freemarker.html