Hello. What is the syntax for adding two integer v...
# advancedpdf
a
Hello. What is the syntax for adding two integer variables? e.g. subtotal and shipping cost. Is assign the correct way on this one?
a
That does not work. If I write ${record.shippingcost}+${record.subtotal}, the output becomes 10+145 not 155. I ended up assigning them to values and adding those in a third variable.
e
I'd expect you to be writing
${record.shippingcost + record.subtotal}
a
Touche. Let me see if your short formula circumvents my nonsense.
@erictgrubaugh Your syntax worked and saves a lot of time. Had to adjust it to the following to account for formatting:
$${(record.subtotal + record.shippingcost)?string(",###.##")}
👍 1