Trying to only show rows on an advanced pdf where ...
# suitescript
d
Trying to only show rows on an advanced pdf where quantitycommitted is greater than zero. Can anyone tell me why this doesn't work? item.quantitycommitted is a native field and when I do ?is_number, it is true. I am so confused... <#if (item.quantitycommitted gt 0)> it returns 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
s
Did you try:
item.quantitycommitted?number
s
quantity committed is null not zero if none committed. In formulae I usually do an NVL({quantitycommitted}, 0).
d
@Sean Hayes Yep, I tried number and string conversions and comparison to no avail. Thanks for the tip though. @Stuart Anderton Great thought. However, when I do a null replacement like this, it still says can't do comparison <#assign qty = item.quantitycommitted!0> <#if (qty gt 0)> Even though the value ?is_number is true So frustrating. Anyone else?
And I also tried <#if item.quantitycommitted?has_content> No luck there either