Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all
I found an oddity with the Peek function and hope there is a solution to it.
I have 2 Load statements for TABL1 and TABL2, preceded by a Qualify *; and Unqualify ID;
At the end of the data load I have a statement:
Let vPeek = Peek('ID',7,TABL1) so that I can see what is in the 8th record
(At this stage I know what will be there because the data I load is an INLINE load of sample data)
When viewing the value in variable vPeek it contains the data from TABL2 (second table to be loaded)
If I remove the Qualify and Unqualify statements the variable value is as I expect it to be from TABL1
Any idea?
Thanks
Let vPeek = Peek('ID',7,'TABL1')
QlikView documentation claims the syntax is as you have written, but in fact you have to use quotes around the table name.
The default behavior of Peek is to read from the last loaded table. When you do not use quotes around the table name it will try to evaluate the field TABL1 and that will return Null(). It will then try to read the field ID from the last loaded table, namely TABL2.
Hope that clears it up for you
Regards
SKG
Let vPeek = Peek('ID',7,'TABL1')
QlikView documentation claims the syntax is as you have written, but in fact you have to use quotes around the table name.
The default behavior of Peek is to read from the last loaded table. When you do not use quotes around the table name it will try to evaluate the field TABL1 and that will return Null(). It will then try to read the field ID from the last loaded table, namely TABL2.
Hope that clears it up for you
Regards
SKG
Thanks a lot!
That indeed corrected the problem