filter( predicate, list, context )
Calls a predicate for each item in a list and returns any items for which the returned value is true.
Keyword | Type | Description |
---|---|---|
|
Function, Rule, or Data Type Constructor |
Expression that returns a Boolean (true or false). |
|
Any Type Array |
List of elements that the predicate iterates through. |
|
Any Type Array |
Variable number of parameters passed directly into each predicate evaluation. |
Any Type Array
Use fn!functionName
to reference an expression function and rule!ruleName
to reference a rule.
a!forEach()
cannot be used within rules used in this function.
filter(fn!iseven,{-1,0,1,2},1)
returns 0, 2
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 | Incompatible | You cannot use this function to configure a process report. |
Process Events | Incompatible | You cannot use this function to configure a process event node, such as a start event or timer event. |
filter() Function