THEN
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Operator that returns the first of two specified values when the conditional expression in IF-THEN-ELSE statement is True.
Syntax
IF(expression) THEN (x) ELSE (y)
Arguments
-
expression
Any expression that evaluates to true or false
-
x , y
An expression that evaluates to an output value
Returns
x when the conditional expression is true and y when the expression is false
Exceptions
None
Example
-
IF ('att1' > 50) THEN ('att2') ELSE ('att3')
[If the value of 'att1' is greater than 50, then return the value of 'att2'; otherwise return the value of 'att3']