GETLastValByEntryName
GETLastValByEntryName(ObjectName: String, OrderEntryName: String, OrderEntryCurrentValue: Variant,
RequestedEntryName: String, CurrentDataID: Integer): Variant;
This function get the previous value of an entry. For that you need
the object name the order entry name, the current value of the order entry in the record,
the name of the requested entry and the current data id.
The object's data will be ordered by the order entry and the previous one will be decided by
also the data id and the current value of the order entry.