${(record.taxtotal/record.subtotal*100)}%
# suitescript
n
${(record.taxtotal/record.subtotal*100)}%
e
What do you want
subtotal
to be if it's empty/zero?
Rather, how do you want this to behave if there's no subtotal?
n
subtotal will always be there. even if 0. So if the subtotal is. zero, tax will always be zero. So, its trying to calculate like this. (0/0)
I can. Put the iff condition there, but i think there is. some other shortcut/function , i can apply on like ISNULL()
e
Is this in a script or in a template?
a
${(record.taxtotal/NULLIF(record.subtotal,0)*100)}%
n
Thanks you very much @alien4u . That worked !