# OR function

OR(First, Other...) OR(First; Other...)

## First

Logical or { Logical }

The first parameter.

## Other

Logical or { Logical } (accepts many)

## Returns

Logical

TRUE if, and only if, one or more parameters are TRUE and FALSE otherwise.

Returns TRUE if one or more values are TRUE and FALSE otherwise. OR(FALSE, FALSE, FALSE)OR(FALSE; FALSE; FALSE) returns FALSE, as not a single parameter is TRUE, but OR(FALSE, TRUE, FALSE)OR(FALSE; TRUE; FALSE) returns TRUE.

Use OR, AND, NOT and XOR in conjunction with IF to express logical conditions.

This formula returns 2 if Field1.ValueField1,Value is 20 or Field2.ValueField2,Value is 40, and 4 otherwise:

IF(OR(Field1 = 20, Field2 = 40), 2, 4)IF(OR(Field1 = 20; Field2 = 40); 2; 4)

The formula can also be written using the Calcapp-specific || operator:

IF((Field1 = 20) || (Field2 = 40), 2, 4)IF((Field1 = 20) || (Field2 = 40); 2; 4)

`||` is written between the values to test, instead of before them, which can make formulas easier to read.

## Examples

IF(OR(Field1 = 20, Field2 = 40), 2, 4)IF(OR(Field1 = 20; Field2 = 40); 2; 4)

Returns 2 only if Field1.ValueField1,Value is 20 or Field2.ValueField2,Value is 40. Otherwise, 4 is returned.

IF((Field1 = 20) || (Field2 = 40), 2, 4)IF((Field1 = 20) || (Field2 = 40); 2; 4)

Returns 2 only if Field1.ValueField1,Value is 20 or Field2.ValueField2,Value is 40. Otherwise, 4 is returned. This example uses the || operator, which is specific to Calcapp, instead of the OR function.

OR({ TRUE, FALSE, TRUE })OR({ TRUE; FALSE; TRUE })

Returns TRUE, because at least one element of the array is TRUE.

OR({ FALSE, FALSE, FALSE })OR({ FALSE; FALSE; FALSE })

Returns FALSE, because no array element is TRUE.

OR({ FALSE, FALSE, FALSE }, FALSE, TRUE)OR({ FALSE; FALSE; FALSE }; FALSE; TRUE)

Returns TRUE, because the third parameter is TRUE.

OR(SwitchField1:SwitchField20)OR(SwitchField1:SwitchField20)

Returns whether one or more switch fields in the SwitchField1:SwitchField20SwitchField1:SwitchField20 range are toggled to their "on" positions.