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)

LastValue

  • Last UpdatedJan 11, 2023
  • 1 minute read

Get the last value in an array that satisfies a given condition.

Syntax

LastValue(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

The last value that satisfies the given condition

Exceptions

None

Notes

None

Example

  • LastValue(Data)

    [Return the last value from an array named Data]

  • LastValue(Data, $val > 90 and $val < 105)

    [From the array named Data, return the last value in the array that is greater than 90 and less than 105]

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