OR
- OR(*values)[source]
Returns True if any input evaluates to True.
This function performs a logical disjunction (OR) over the provided inputs. If at least one value is True, the result is True; otherwise, the result is False. The inputs may be boolean literals, fields, formulas, calculations, or parameters.
- Parameters:
*values (
Operand|bool) –An arbitrary number of boolean or boolean-compatible inputs. At least one input is required. If the input is non-boolean, it is treated as True if non-zero, else False.
Supported types:
BOOLEAN
BOOLEAN_ARRAY
INTEGER
INTEGER_ARRAY
DECIMAL
DECIMAL_ARRAY
- Return type:
- Returns:
True if any input is True, False otherwise. Evaluates to an error value if any input is null or in an error state. If a single array input is provided, returns scalar value representing the OR across all elements in the array. If multiple arrays are provided, returns an array where each element is the OR of the corresponding elements across all input arrays.
Supported types:
BOOLEAN
BOOLEAN_ARRAY
- Raises:
ValueError – If no inputs are provided.
ValueError – If any input is not boolean-compatible.
Examples
Basic usage with literals:
OR(True, False, False) # Returns True
Usage with table column:
OR(order_table["is_urgent"]) # Returns True if any row in the column 'is_urgent' is True