FilterData
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2024 R2
- PI Server
Get all the values in an array that satisfy a given condition.
Syntax
FilterData(a1, condition($val))
Arguments
-
a1
a variable representing the array to operate on
-
condition($val)
any supported PE statement, as a function of $val, that returns a true or false. $val is a placeholder for each value in the array
Returns
An array of all the values that satisfy the given condition
Exceptions
None
Notes
None
Example
-
FilterData(Data, (NOT BadVal($val) AND $val > 50))
[From an array named Data, return a new array of values where none are bad values and all are greater than 50]