zeroblank(
VALUE
)

The zeroblank( function tells Panorama to treat zeroes as empty space.


Parameters

This function has one parameter:

value – is any value or formula. If a formula containing a zeroblank( function has a value of zero, and the result is assigned to a field, the result of the formula will be blank (empty).


Description

The result of a zeroblank( function is simply the value of its parameter, but it has the side effect of setting a flag which tells Panorama to change a result of zero to an empty result, when it is assigned to a field. This example calculates a line item in an invoice. The amount is calculated by multiplying the quantity times the price. However, if either the quantity or the price is zero or blank, the amount will be blank (empty). This avoids the cluttered look in your invoices.

Amount = zeroblank(Quantity * Price)

Note that the zeroblank( function does nothing at all if the result of the formula is not assigned to a field (for example if the formula is displayed in a Text Display Object or is assigned to a variable.

Advanced: It doesn’t matter where the zeroblank( function is placed in the formula. All of these assignment statements work exactly the same.

Amount = zeroblank(Quantity * Price)
Amount = zeroblank(Quantity) * Price
Amount = Quantity * zeroblank(Price)

Also, it doesn’t matter whether the value inside the zeroblank( function is zero, it only matters if the result of the overall formula is zero. For example, consider the formula:

Amount = Quantity * zeroblank(Price)

You might think that if the Quantity was 0 and the price was 99, the result in Amount would be zero, but it won’t, it will be empty. If the formula contains a zeroblank( function anywhere in it, it’s impossible to assign zero to the specified field. If the result of the formula is zero, the zero value will always be converted into an empty field.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0