FunctionCopy link to clipboard
and( value )
Returns true
if all inputs are true
; returns false
if at least one input is false.
ParametersCopy link to clipboard
Keyword | Type | Description |
---|---|---|
|
Boolean |
A value or array of values that must be true for the function to return true. |
ReturnsCopy link to clipboard
Boolean
Usage considerationsCopy link to clipboard
Casting and returning boolean valuesCopy link to clipboard
- Arguments are cast to Boolean before
and()
evaluates. - As soon as the returned value of a value evaluation returns
false
, the function returnsfalse
.
Evaluation order and performanceCopy link to clipboard
- Multiple arguments are evaluated left-to-right.
- By keeping common conditions on the left and complex edge cases on the right, you can improve function performance. That way, if an earlier, simple function returns
false
, evaluation of the later edge cases never occurs.
Null and empty arraysCopy link to clipboard
- Null values that are part of input arrays are filtered out before evaluation.
- Empty arrays evaluate to
true
. - Empty text strings in a text array evaluate to
false
, but empty text strings in an array with multiple data types are considered null values and are filtered out before evaluation.
ExamplesCopy link to clipboard
Use functions to Pass Multiple Logical Values:
and(isleapyear(1996),isleapyear(1997))
returns false
Pass an Empty Array:
and({})
returns true
Pass an Array of Numbers:
and(1,2,"",3)
returns true
and(0,1,2,"",3)
returns false
because 0
casts to false
Feature compatibilityCopy link to clipboard
The table below lists this function's compatibility with various features in Appian.
Feature | Compatibility | Note |
---|---|---|
Portals | Compatible | |
Offline Mobile | Compatible | |
Sync-Time Custom Record Fields | Compatible | Can be used to create a custom record field that only evaluates at sync time. |
Real-Time Custom Record Fields | Incompatible | |
Process Reports | Compatible | |
Process Events | Compatible |
FeedbackCopy link to clipboard
Was this page helpful?