Anybody know why the below code is giving me an er...
# advancedpdf
j
Anybody know why the below code is giving me an error? I'm trying to make it so that the alignment of the check is different for a specific subsidiary, which has a slightly different check layout.
<#if check.subsidiary = "ABC COMPANY"><body padding=".3in 0.5in 0.5in 0.5in" size="Letter">#else<body padding=".45in 0.5in 0.5in 0.5in" size="Letter"></#if>
s
It may just not like having two body tags ( in spite of the if/else ), but you could implement the logic this way in a single line:
<body padding="${(check.subsidiary == 'ABC COMPANY')?string('0.3in', '0.45in')} 0.5in 0.5in 0.5in" size="Letter">
j
This results in the same error I was getting previously, just in a different column (always seems to be the first column of the check.subsidiary, record.subsidiary, vendorpayment.subsidiary field, no matter how I try to join it)
message has been deleted
It lets me save it with slightly modified code, but it doesn't actually change the alignment based on the condition: <body padding="(record.subsidiary == 'Mission Chemical')?string('0.3in', '0.5in', '0.5in') 0.45in 0.5in 0.5in" size="Letter">
Hmm. I see now what you did, passing the true result into the string to replace the first value and the false result into the string as the first value. doesn't seem to be working though
s
Have you tried just printing/displaying the value of
record.subsidiary
or
check.subsidiary
to make sure it has the expected value? Also, you can try printing as HTML so that you can inspect the output via the browser.
You can also try using
subsidiary.name
instead