Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2024 R2)

MapData

  • Last UpdatedJan 11, 2023
  • 1 minute read

Apply a function to each value in an array.

Syntax

MapData(a1, function($val))

Arguments

  • a1

    a variable representing the array to operate on

  • function($val)

    any supported PE statement, as a function of $val, that performs an operation. $val is a placeholder for each value in the array

Returns

The transformed array of all the values

Exceptions

None

Notes

The output array has the same timestamps as the input array.

Example

  • MapData(Data, (IF BadVal($val) THEN 0 ELSE $val))

    [From an array named Data, return a new array with bad values set to 0]

In This Topic
TitleResults for “How to create a CRG?”Also Available in