Learn about code flow control (IF statement)
- Last UpdatedJan 28, 2025
- 1 minute read
- PI System
- PI Connector for UFL 1.3.2.139
- Connectors
To define processing logic, specify the If statement as follows:
If <condition> Then <expression(s)> [Else <expression(s)>] EndIf
Specify the condition as follows:
{[NOT] <predicate> | (<condition>)}[{AND | OR} <condition>][, …]
Within the condition clause, specify the predicate as follows:
<predicate> ::= <expression>
{ == | > | < | >= | <= | <> | != } <expression>
In the predicate, specify the expression as follows:
<expression> IS [NOT] NULL
Example: If statement
If( FIELD(1) IS NOT NULL) Then
StoreInPI(FIELD(1),,NOW(),FIELD(2),,)
EndIf