Azi
08/03/2022, 3:44 PM<td class="address" colspan="6" rowspan="2">${record.billaddress} || ${record.shipaddress}</td>
I don't want to start with ifs and else since in my case I already have a bunch and it would get very messy to start adding ifs to all of themscottvonduhn
08/03/2022, 4:14 PM${(record.billaddress?length == 0)?string(record.shipaddress, record.billaddress)}
Azi
08/03/2022, 4:16 PM.then
but was having trouble because it expects a boolean value and I am so used to
JS that I assumed it would just evaluateAzi
08/03/2022, 4:16 PMmichoel
08/03/2022, 11:09 PMmichoel
08/03/2022, 11:10 PM<#macro coalesce args...>
<#list args as arg>
<#if (arg!"")?length gt 0>
${arg}
<#break>
</#if>
</#list>
</#macro>
which you could then use
<@coalesce record.billaddress record.shipaddress />
michoel
08/03/2022, 11:15 PM?then
, but if it does you should be able to do
${(record.billaddress?length gt 0)?then(record.billaddress, record.shipaddress)}
michoel
08/03/2022, 11:15 PMAzi
08/04/2022, 12:59 AM