all() Function
This function may not be compatible with all features of Appian. For details, see the Feature Compatibility section below.

Function

all( predicate, list, context )

Calls a rule or function that returns either true or false for each item in list, asks the question, "Do all items in this list yield true for this rule/function?", and returns true if all items in list evaluates to true.

Parameters

Keyword Type Description

predicate

Function, Rule, or Data Type Constructor

Expression that returns a Boolean (true or false).

list

Any Type Array

List of elements that the predicate iterates through.

context

Any Type Array

Variable number of parameters passed directly into each predicate evaluation.

Returns

Boolean

Usage considerations

Referencing expressions and rules

Use fn!functionName to reference an expression function and rule!ruleName to reference a rule.

Understanding results

Returns false as soon as the returned value of an evaluation yields false; otherwise, returns true.

Empty and null lists yield true.

Limitations and alternatives

Serves as an alternative to and(apply(rule!iseven, {-1,0,1,2})).

a!forEach() cannot be used within rules used in this function.

Examples

Given a function f(x), all(fn!f, {a, b, c}, v) returns and({f(a, v), f(b, v), f(c, v)}).

all(rule!iseven,{-1,0,1,2},1) returns false

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Compatible
Offline Mobile Compatible
Custom Record Field Expressions Compatible
Open in Github Built: Fri, Aug 12, 2022 (09:54:06 AM)

On This Page

FEEDBACK