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

Qlikview Personal edition reload with Windows task scheduler

Hi Guy,

I am on PE at the moment, My requirement while evaluating Qlik for our company is below, Please can anybody help me on this

I have a very small amount of data from csv file, Now I have created couple of charts and want this to be automatically reload and update the records. The idea is to open the desktop edition on a screen in the office and schedule the reload every 15 mins so that the records gets updated, I have successfully made it to reload with -r command but this is not updating the records while the document is open, I also tried command L which always opens a new instance of desktop and updates the record but doesn't save the qvw which is fine, but am struggling to find a way to not open new instance but to show in the current open qvw (desktop itself), Is there a way to do this please...

Thanks for your help

36 Replies
Anonymous
Not applicable
Author

Hi Marcus, Thanks for the reply, Yes you are right, There will be no user intervention, no filters nothing to select..its just a simple dashboard with few KPI's to be shown on a screen....so the desktop would be opened on the screen and it needs to update the records after every reload on a 15/30 mins frequency when I schedule through windows task manager (wtm), I have tried your approach to trigger in ON OPEN, but don't know its not updating..please see below my step by step process I followed in the attached document, Can you please let me know what I am doing wrong in achieving this please? Thanks a lot again

Automate QVW from personal desktop

Step 1)

This is my QVW, with a simple count(ID)

Step 2)

  1. Opened SettingsàDocument propertiesàTriggersàOnOpenàActionsà

Step 3)

Click on edit module and copy pasted your code

When I click on Test at the top where it say ready in the above image it say’s “Variable is Undefined :’QA’, So tried changing Set QD = instead of Active document I have given my QVW name which is ReloadTest.qvw but it’s still the same

Step 4)

Clicked on OK and saved the document, closed and opened the document again and then created a WTS

My .bat file code is like this

"C:\Program Files\QlikView\Qv.exe" /r "C:\Users\sandeep.movva\Desktop\ReloadTest.qvw".

Anonymous
Not applicable
Author

Hi Stefan,

As I am on Personal edition at the moment I am unable to open the document attached, Is it possible to let me know or the code to follow what I need to do please, This will be really helfull

Thanks a lot

Anonymous
Not applicable
Author

Document attached of the step by step process

marcus_sommer

Yes, the variable QA is wrong (left from the origin example) and needs to be removed. As a next step I would check if the macro runs like it should directly triggered from the modul-editor by pressing the button "Test" - of course by reducing the number of iterations and the time-span of the sleep-statement because 3 - 4 fast iterations are sufficient to check if the reloads are executed and afterwards the application closed or not.

Further in this logic you need only a daily trigger from the windows-tasks and not per quarter-hour because the loop within the macro does the regular reloadings.

Also the batch-file won't b needed because it could be directly defined within the windows-task and the starting-parameter should be /l and not /r:

- Marcus

Anonymous
Not applicable
Author

I have taken out "set QD = QA.ActiveDocument.GetApplication" from the code, Now when I click on test it throws me "Variable is undefined: 'i'

marcus_sommer

Try it with this:

...

Dim QD, doc, i

set QD = ActiveDocument.GetApplication

...

The message because i is caused from the Option Explicit which enforced that all used variables are declared before they could be called: Option Explicit Statement (Visual Basic) | Microsoft Docs

- Marcus

Anonymous
Not applicable
Author

Thanks a lot, I have clicked on test button and it shows me executing, I will let you know once I finish my testing, If I understood right my net steps is to, Create windows task schedule with daily trigger and create a action with l statement...so hopefully this will all work as expected... I will let you know the outcome....Thanks really helpfull

Anonymous
Not applicable
Author

Hi,

It is still opening separate instance when starting the reload..please find the screenshot in the attached, I have scheduled windows task to run daily which is starting from now which is 17:35, so it opened a new instance even though the same qvw is opened on a screen

I waited if it would reload on the new instance opened after 15 mins but it didn't ?

Anonymous
Not applicable
Author

Also after I click on test, it hangs at executing and when I close it forcefully and re open the document it shows me the updated records which means it actually is reloading and saving the document.....I think I am missing something small here where I need to take care? Can you please suggest me from the above information please

Thanks again

swuehl
MVP
MVP

1) Create a test script that changes value (to show the successful reload):

LOAD Ceil(RAND()*10) as Test

autogenerate 1;

2) Reload

3) Create listbox for field Test

4) Create a Macro

2018-01-17 18_55_27-Edit Module.png

5) Create a Variable vVar

=Round(Now() , maketime(0,0,15))

(for a 15 second reload)

=Round(Now() , maketime(0,15,0))


for a 15 minute reload

6) Create a variable onChange trigger in Settings-Document properties - Triggers:

2018-01-17 19_05_08-Reply to Re_ Qlikview Personal edition reload ... _ Qlik Community.png