IIf

<< Click to Display Table of Contents >>

 

IIf

IIf(Condition, ExprTrue, ExprFalse)

Returns the expression contained in ExprTrue if the condition evaluated in Condition is true, and the expression contained in ExprFalse if the evaluated condition is false. This method is available in Links, as well as in scripts.

 

NOTE

This method does not propagate values' quality nor timestamp. If a Link contains the expression IIf(Tag1.Value = 0, Tag2.Value, Tag3.Value), the result is the value of Tag2 or Tag3, but with Good (192) quality and current timestamp. To preserve this information, users must specify only the object, such as IIf(Tag1.Value = 0, Tag2, Tag3).

Was this page useful?