I am trying to have a word print on my pdf if a ch...
# advancedpdf
p
I am trying to have a word print on my pdf if a check boxed is checked. I thought it would be something like <#if record.checkbox == "T">This is checked#elseThis is not checked</#if> but that is not working. What is the correct syntax for this?
Found the answer: <#if record.checkbox>This is checked#elseThis is not checked</#if>
s
Check this out as well (in other words, it’s not simple. sometimes a checkbox is a boolean, sometimes it’s a string, and it can even change on you!) https://netsuiteprofessionals.slack.com/archives/C466X49JB/p1614199276053200?thread_ts=1612556490.099700&amp;cid=C466X49JB
d
yeah, NetSuite's solution is to use:
<#if (record.checkboxfield?is_boolean && record.checkboxfield) || (record.checkboxfield?is_string &&
record.checkboxfield== "T")>
m
I used to have a function in my templates called
isNetSuiteTrue
that would do basically that
👍 1