Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to use/create a Scriptvariable via LOAD

Hi, how can I use OLDFIRSTOCCURENCE as an Scriptvariable?

LOAD
MaxString(Status.FIRSTOCCURRENCE) as OLDFIRSTOCCURRENCE
FROM status.qvd (qvd);

I already tested:

let OLDFIRSTOCCURRENCE = peek('OLDFIRSTOCCURRENCE');

but it doesn't work!

best regards
Ingo Placzek



9 Replies
Not applicable
Author

Hi,

the correct definition is:

Let varOLDFIRSTOCCURRENCE = peek('OLDFIRSTOCCURRENCE', 0, 'TableName');

See QV help for more details.

Good luck!

Rainer

Not applicable
Author

Hi, I write it like this, but varOLDFIRSTOCCURRENCE is empty.but in an listbox, he shows me the value.

Statustime:
LOAD
MaxString(Status.FIRSTOCCURRENCE) as OLDFIRSTOCCURRENCE
FROM statustime.qvd (qvd);

let varOLDFIRSTOCCURRENCE = peek('OLDFIRSTOCCURRENCE',0,'Statustime');

Miguel_Angel_Baeyens

Hello Ingo,

It's happening to me, and I work around that doing instead

FieldValue('OLDFIRSTOCCURRENCE', 1)
Which version of QV are you using?

Not applicable
Author

im workin with 9.00 SR4 too, but it dowsnt work if I write:

let varOLDFIRSTOCCURRENCE = FieldValue('OLDFIRSTOCCURRENCE', 1)

the value is <NULL> like before with peek

Not applicable
Author

Hi Ingo,

please upload some sample data.

I used this kind of statement very often and it worked well.

Rainer

Not applicable
Author

in FIRSTOCCURRENCE are timestamps like: 2010-02-20 04:00:01.000000

how can i upload qvd files?

Not applicable
Author

Go to "Reply" ==> Options ==> Add/Update

Rainer

Not applicable
Author

Hi, here is the qvd-file

Not applicable
Author

Hi Ingo,

hope your problem is solved now.

Good luck!

Rainer