Operators (conditional)
Use conditional operator functions to link two conditional expressions.
To instruct Longview to carry out certain instructions, use a conditional operator:
Conditional Operator | Description |
---|---|
And |
When each of several conditions must be true. |
Or |
When one of several conditions must be true. |
You can use parentheses to change or change the order in which conditions are evaluated; for example:
IF (Cash1 GT 0 OR Cash2 LT 100) AND (Cash3 LT 0 OR Cash4 NE 100)
Use conditional operators in Longview documents as follows:
Longview documents | Model Procedure |
---|---|
Must be used with… |
If When While |
Positioning |
Can be used with If statement in all documents. Can be used with When statement in Model Documents. |
Syntax:
Condition1 OPERATOR Condition2
where:
- Each Condition is a relational expression containing the EQ, GE, GT, NE, LT, or LE functions, or another expression containing the And or Or functions. For information on relational operators, see Operators (relational).
- OPERATOR is a conditional operator. Select one of the following:
Value | Description |
---|---|
And |
To find an expression that matches both conditions. |
Or |
When one of several conditions must be true. |
Syntax example:
IF NetInc GT 0 AND Debt LT 0.2 "*" NetInc