LVAL returns the last value entered for the variable specified.
SYNTAX:
LVAL(Cx)
where :
Cx is a conditional variable x
NOTES:
Searching beings on the previous date and will stop when a value is located or after 183 days have been searched.
If no data is found, a value of zero is assumed.
The variable to be searched must be specified as a Conditional Variable (use a "C" instead of a "V")
When using LVAL for a variable that seldom changes (like the number of aeration basins online), remembr that LVAL begins on the previous day. Therefore, in many cases the changes should be recorded on the preivous day.
EXAMPLES:
Example 2: V101 = LVAL(C70)
Variable 101 contain the most recent value of variable 70 constant until a new value for variable 70 is entered:
Example 2:
This function is useful for inventory calculations where the target variable contains the current inventory:
V132 = LVAL(C132) + C128 - C129
= Previous inventory + receipts - usage
This example requires an initial "seed value". The seed value may be a value entered on a previous day in the "receipts" variable (variable 128 in this example) or you may choose to enter an initial inventory value into this calculated variable (variable 132) using Forced Data Entry.