I am trying to use and if statement to change the ...
# advancedpdf
p
I am trying to use and if statement to change the header of invoice based on the record. subsidiary but am getting an error and not sure what I am doing wrong.
Copy code
<#if record.subsidiary == 2>
some text
</#if>
p
<#if subsidiary.internalid=="2">
try that
p
Did not work - get the following error: Can't compare values of these types. Allowed comparisons are between two numbers, two strings, two dates, or two booleans. Left hand operand is a hash+string (wrapper: com.netledger.templates.model.StringModel). Right hand operand is a number (wrapper: f.t.SimpleNumber). The blamed expression: ==> subsidiary.internalid== 2
p
Yeah, see how I put the "2" in quotes?
👍 1
p
🤦‍♂️
facepalm 1