RE: Advanced PDF print statement when a condition is met
Using advanced pdf, I am trying to modify a picking sheet to print a statement when {shipcomplete} is Yes. I am using the <#if> but have issues when the field is null.
I tried the following
<#if record.shipcomplete?has_content>
<#if record.shipcomplete == “Yes”>
SHIP COMPLETE
</#if></#if>
When I do so, I receive the error below.
If the failing expression is known to 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)??
I am not familiar with the myoptionalvar and do not know how to incorporate it into the picking sheet.
Any help will be greatly appreciated.
I have really tried to simplify the language, but continue to receive an error. Any thoughts would be really appreciated.
<#if record.shipcomplete == “Yes”>
<td>SHIP COMPLETE</td>
<#else>
<td> </td>
</#if>