VALUE1
or
VALUE2

The or operator returns true if either operand is true, or false if both are false.


Parameters

This operator has two parameters:

value1 – The first Boolean value.

value2 – The second Boolean value.


Description

The or operator combines two Boolean values by or-ing them together. This example checks to see if a transaction is being paid for with a credit card.

if PaymentMethod="Visa" or PaymentMethod="MasterCard"
    Terms="Credit Card"
endif

The result is true if the payment method is Visa or MasterCard.

Note that each side of the or operator must contain a complete formula. The formula below looks correct in English, but will not work in Panorama:

PaymentMethod="Visa" or "MasterCard" ☞ Error

Here is the correct formula:

PaymentMethod="Visa" or PaymentMethod="MasterCard"

Note: The Boolean values true and false are actually integer (numeric) values -1 and 0.

Note: If you are a “C” programmer, Panorama’s or operator is equivalent to C’s || operator. (In fact, Panorama will allow you to use || if you wish, however, you should avoid this if your formula also uses the pipe character for text constants like this: ||this is a constant||.)


Error Messages

Cannot OR a number with text. – Both operands must be numbers. If either operand contains a text value, an error occurs.


See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0