Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Create a Variable from a Field value in script

Hi, hope someone will be able to help me with this, I need to set a field value to a variable in my script so that I can use it in a where clause when loading other tables. I tried this:

Qualify *;
  LASTTIMESTAMP:
LOAD End_Number
 
FROM
[\\euuklefp01\apps_usr\Data Team\LastTimeStamps.csv]  (
txt, utf8, embedded labels, delimiter is ',', msq);
UNQUALIFY *;

LET vUpdateDateStart = LASTTIMESTAMP.End_Number

but I get an error message from the last line, is there a way to do it? The contents of End_Number change every hour.

The file I am loading from only contains one number and a header and it looks like this

Any help would be appreciated, Thank you Simon

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

Qualify *;
LASTTIMESTAMP:
LOAD End_Number
FROM
[\\euuklefp01\apps_usr\Data Team\LastTimeStamps.csv]  (txt, utf8, embedded labels, delimiter is ',', msq);
UNQUALIFY *;

LET vUpdateDateStart = Peek('LASTTIMESTAMP.End_Number');

View solution in original post

2 Replies
sunny_talwar

May be like this:

Qualify *;
LASTTIMESTAMP:
LOAD End_Number
FROM
[\\euuklefp01\apps_usr\Data Team\LastTimeStamps.csv]  (txt, utf8, embedded labels, delimiter is ',', msq);
UNQUALIFY *;

LET vUpdateDateStart = Peek('LASTTIMESTAMP.End_Number');

Not applicable
Author

Sunny, as always thank you very much, Simon