Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Modifying the script dynamically

Hi,

My qlikview report has a query which has a WHERE condition that contains date & time.

I want this report to get reloaded automatically in every 6 hours with fresh date & time parameters ( this date and time parameter will be using OS date & time).

Is it possible to do that?

Thanks!

1 Solution

Accepted Solutions
Not applicable
Author

Hi

You have two options;

Firstly, load a variable in your script such as;

Let xxx = now();

This will create a timestamp.  Then simply take 6 hrs off it - now() - 0.25  (0.25 as 6hrs is a quarter of a day).  This will provide you with the time 6hrs ago and you need to load anything created after that by using this where clause at the end of your load;

where createdstimestamp > xxx

However, loads may fail and therefore you miss a 6hr period.  I would recommend you load the now variable at the end of your load and save this variable into the qvw.  Then your next load can read when the last load completed and load anything after that - even if load(s) fail and more than 6hrs need loading.

Does that answer your question?

Let me know how you get on.


Regards


Steve

View solution in original post

3 Replies
Not applicable
Author

Nobody knows about it?

tresesco
MVP
MVP

You can always use Date() function in a where clause of load scipt in qv. But what you want should be handled using QV Publisher or Windows scheduler.

Not applicable
Author

Hi

You have two options;

Firstly, load a variable in your script such as;

Let xxx = now();

This will create a timestamp.  Then simply take 6 hrs off it - now() - 0.25  (0.25 as 6hrs is a quarter of a day).  This will provide you with the time 6hrs ago and you need to load anything created after that by using this where clause at the end of your load;

where createdstimestamp > xxx

However, loads may fail and therefore you miss a 6hr period.  I would recommend you load the now variable at the end of your load and save this variable into the qvw.  Then your next load can read when the last load completed and load anything after that - even if load(s) fail and more than 6hrs need loading.

Does that answer your question?

Let me know how you get on.


Regards


Steve