AND
- AND(*values)[source]
Returns False if any input evaluates to False.
This function performs a logical disjunction (AND) over the provided inputs. If at least one value is False, the result is False; otherwise, the result is True. 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:
False if any input is False, True 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 AND across all elements in the array. If multiple arrays are provided, returns an array where each element is the AND 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:
AND(True, False, False) # Returns True
Usage with table column:
AND(order_table["is_urgent"]) # Returns False if any row in the column 'is_urgent' is False, otherwise True