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

Qlikview Desktop auto-refresh

Hi all,

I would like to set a regular refresh of the QV desktop client, e.g. every minute. How can this be done? Can I utilize now() ?

14 Replies
sifatnabil
Specialist
Specialist
Author

See the attached batch file. You then need to create a task on Windows Task Scheduler that will execute this batch file.

oseimuduame
Creator II
Creator II

Hello Saifat Rahman,

Please how do i increase the Auto refresh time to like 15minutes or 10 minutes

or if you can explain this script

=if(left(subfield((now()-ReloadTime())*1440,'.',2),1)=5,999,0)

Mawkishrains
Contributor
Contributor

Does this method still work, I did create the variable and the macro, but the refresh doesnt trigger automatically, i have to manually update the variable for the change to work, how can i define a variable that is in memory and automatically updates? does this method work for any one? can someone help me understand what am i doing wrong here?

SOR124248
Contributor
Contributor

Not sure if this will help or not. But for the sake of how I get this to work..
I use a very basic Windows PowerShell script.

When I've used Windows Scheduler in the past, I've had issues getting it to run.
I believe it's something to do with the user security within Windows, which I won't go into, I'm sure someone can confirm.
I decided to create a PowerShell script that sort of works like it's own scheduler.
This is VERY simple version of my code, I have removed the dynamic features such as passing parameters etc.

------------------------------------------------------------------------------------------------------------
Function Load_Data {
While ( $true ) {
Run-QlikReport
Start-Sleep -Seconds 60
}
}

Function Run-QlikReport {
Start-Process "C:\Program Files\Qlikview\qv.exe" "/r C:\Qlik\Load_QVD.qvw" -Wait
}

Load_Data
------------------------------------------------------------------------------------------------------------

Breaking this down
While ($true) <-- This will run an 'infinite' loop

Start-Process <-- Powershell command for running an external application/script
C:\Program Files\Qlikview\qv.exe <-- Qlikview application path
/r <-- send parameter to QV to refresh and save.
C:\Qlik\Load_QVD.qvw" <-- Location of the qvw to be refreshed.
-Wait <-- PowerShell parameter to force the script to wait until QV finishes the refresh.

I then just run this on the machine all the time.
You can obviously include several files, change the amount of wait time between refreshes etc.
It works well for me.

dobrien7
Contributor
Contributor

The variable/trigger/macro method is a great summary. Thanks so much.

However, when I do this I get a reload happening every few seconds, even with a higher trigger value [i.e. 0.8 minutes] to produce the rising edge. I can only imagine that each reload results in a falling edge of the vTriggerReload trigger, and the OnChange picks up this falling edge as a change, thus continually provoking a fresh reload. It eventually stops reloading and waits for the counter to reach threshold again. Number of reloads before settling down can vary between 3 and 35

Perhaps I'm very wrong with that assumption, but either way I'd very much appreciate any feedback on additional steps to avoid what I'm experiencing. Many thanks