Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Arokzx99
Contributor
Contributor

Peek Function usage

Hi All,

Iam using Peek function to load the value of a column from particular table into variable .

The Column has more than 15 records, and I have used the below script 

Let vVar=Peek('ColumnName',9,'tblname');

Iam appending the row number manually such as 9 , 10 ,11 every time while assigning value to variable 

The code works fine for up-to 8 records but after that it shows null value in variable .I have checked the source table and there are more than 9 records present in the column.

Please let me know the reason and resolution for this 

Thank You !

Labels (2)
3 Replies
Vegar
MVP
MVP

There should not be such a limitation to the peek().
Make sure that you load the table in the right order.
As 0 denotes the first row, to peek row 9 you should type Peek('ColumnName',8,'tblname');

https://help.qlik.com/en-US/qlikview/November2018/Subsystems/Client/Content/QV_QlikView/Scripting/In...

Arokzx99
Contributor
Contributor
Author

Thanks Vegar,

 But the function is working till 8 rows only after that the variable has null value.

Also when I am running the peek function for particular row  say '9'while commenting out the rest of peek functions for other rows it works .

Not sure why is it happening. 

Vegar
MVP
MVP

Could you try to reproduce this behavior using an inline table and post the script here?