Calling convention: GETLastVal("OrderByEntryName": String, "ValueEntryName": String, [DefaultValue: Variant]): Variant
Description: Returns the requested entry value from the preceding record of the current object, ordered relative to the current record's value of another entry.
Parameters:
OrderByEntryName: entry used to order records.
ValueEntryName: entry whose preceding value is requested.
DefaultValue: optional fallback when no preceding value exists. Without a supplied default, the desktop application may ask the user for a value.
Returns: Previous entry value, optional default, user-entered value, or NULL when no value can be obtained. Date/time and duration values may be rounded to seconds according to the global setting.
Availability: Default; requires a visible current DB form and an entry calculation context.
Example:
PreviousValue := GETLastVal("EventTime", "Status", "Unknown");