Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Can you tell me what is differencr between peek() and previous() funcion in detail?
Regards,
kushal
Hello Kushal,
Search a bit in the forums and you will find some useful information about that, in addition to check the Reference Manual.
Anyway, the difference is that Peek() refers to any value already loaded in the record specified, whether it's the previous value for the field, or any other. Previous() only refers to the immediately previously loaded record.
Check this post to see a working example of Peek() and Previous().
Regards,.
BI Consultant
Kushal,
The F1 help explains this very clearly. Without the second parameter, Peek() is the same as Previous().
Jason
Hi Kushal,
In addition to above postings (and to the always helpful links to existing help functions / pages) I want to add a difference between peek and previous (but no more than I can get from the Help also):
While previous evaluates an expression in the context of the previously loaded record (but note that you may use nested previous statements) and this context is still the input record, before restricting to the fields stored in the associated DB, peek is more like a lookup function to return the value of a given field and index, where you only can adress the fields stored in the associated DB.
So, depending on your expression, peek() and previous() may differ also when used with only one parameter (more precisely, you can't even use peek with an expression, you specify a fieldname).
Regards,
Stefan