Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
rustyfishbones
Master II
Master II

Using PEEK function with " double quotes

Hi All,

I have the following peek function

let vLastRecord = PEEK('generated_timestamp',-1,'MasterTable') ;

But the Variable does not get populated.

I think it's because in the table the filed is "generated_timestamp"

If I try

let vLastRecord = PEEK('"generated_timestamp"',-1,'MasterTable') ;


or try

let vLastRecord = PEEK('[generated_timestamp]',-1,'MasterTable') ;  neither work



7 Replies
Sergey_Shuklin
Specialist
Specialist

Hello, Alan!

Is there everything ok with field names? And '-1' will return the last readed record value, maybe there is some inappropriate value?

sunny_talwar

Have you checked the name of the field after the reload completes? Is it generated_timestamp or "generated_timestamp"

rustyfishbones
Master II
Master II
Author

It's generated_timestamp

sunny_talwar

So, then your issue is something else (and not the double quotes)... what if you try this?

let vLastRecord = PEEK('generated_timestamp') ;

rustyfishbones
Master II
Master II
Author

I have tried that already and still it does not populate the VARIABLE.

It works when I store the Data into a qvd, drop the original table and when I reload the qvd, the variable gets populated.

But not on the original extraction of data.

sunny_talwar

What is the exact script before this variable?

pradosh_thakur
Master II
Master II

let vLastRecord = PEEK('"generated_timestamp"',-1,'MasterTable') ; is working for me . i tried something similar with the data base too.


can you please check if there is any space.


Can you share the line where "generated_timestamp"  is extracted from dtaabase to qvw?


is it like  expression as ["generated_timestamp"] or something else?


regards

Pradosh

Learning never stops.