If...
Use this command to carry out commands conditionally in a Procedure document.
Your system tests whether a particular condition exists or not, and issues instructions based on the result.
- If the value is not zero, it is true, and it carries out Instructions1.
Note: In models, this command will carry out the instructions for all the intersections in the DataArea if there is data that matches the criteria stated in the command.
- Otherwise, it carries out Instructions2.
- If you omit Instructions2, nothing happens if the value is zero.
You can nest up to ten levels of If statements per Procedure document.
Syntax:
IF <Condition>
Instructions1
[ELSE
Instructions2]
END IF
where:
- Instructions1 is a set of instructions carried out by your system if the value in the test cell is true (not zero).
- Instructions2 is a optional set of instructions carried out by your system if the value in the test cell is false (zero). If you include Instructions2, use the ELSE statement.
If you omit Instructions2, the command carries out instructions only when the test cell is true.
Syntax example:
CREATE VARIABLE Test AS NUM SET VARIABLE Test = VALUE (Master, A99999, AYR01, WDGTMFG) If $Test$ GE 100 RUN MODEL DivCalc.mod ON MASTER End If
Caution: The names of variables in Longview Application Framework to be used in data event triggers are limited to 10 characters. The convention is E_DIMNAME (where DIMNAME is the first 8 characters of the dimension name). In the case where the first 8 characters of the dimension names are the same, the variables are named E_DIMNAME_N (where DIMNAME is the first 6 characters of the dimension, and N is the dimension number).
See also