Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm trying to setup a monitor application with QlikView, and one of the requirements that I'm trying to tackle is the ability to rotate the sheets in a document. on an interval. Think of it like a slideshow that loops forever and changes slides every 10 seconds.
I'm not a VBScript expert, but I'm sure I could come up with the correct code to handle the timing and the changing of the sheets. The problem is that I need to be able to run a subroutine in the background of the application. If I try to create an infinite loop, it will just hang the application forever. As far as I've read, I can't spawn a new thread with VBScript either, so I'm not sure what else I can do.
Any thoughts on how else I can solve this problem?
hi,
you do not have to use vbscript. Utilize now() function with some simple math functions and sheet property Show Conditional.
Have a look and play with this simple document attached - sheets changes around every 10 sec.
Cheers
Karol
Hi Karol
This looks great and may solve an issue I have...
1) Is it possible that you could give some background with regards to how this works?
2) There will obviuoulsy be updates running in the background uodating the information which feeds the report.
How do you force the report to refresh with the updated data?
Thanks in advance for any help you can give...
Regards
Paul
Hi Karol ,
Thanks for such beautiful example.
Cheers
Bhushan N
Hi Paul,
no problem, probably you will have to play with a little bit to adjust the Rotation Time to your needs.
This solution is using a now() function. Do a simple test a put this function into the Text Object and see that it is kind of dynamic (you can see seconds changing). I played with this function a little bit and I come to this expression:
=
subfield(replace(round(num(now()),0.0001),'.','')/5,'.',2)
Put it to the Text Box and see how the results changes. You can see that you get values like null,2,4,6,8. So now you can use it in a Sheet's Show Condition property. Before that though, create 5 empty sheets, go to Document Properties->Sheets->, select first sheet, click on Properties button, go to General Tab, Select Show Sheet Conditional and put this expression:
=
len(subfield(replace(round(num(now()),0.0001),'.','')/5,'.',2))=0
Apply the similar logic for the remaining 4 sheets. They wiill have a slightly differen show condition:
- 2nd sheet: =subfield(replace(round(num(now()),0.0001),'.','')/5,'.',2)=2
- 3rd sheet: =subfield(replace(round(num(now()),0.0001),'.','')/5,'.',2)=4
- 4th sheet: =subfield(replace(round(num(now()),0.0001),'.','')/5,'.',2)=6
- 5th sheet: =subfield(replace(round(num(now()),0.0001),'.','')/5,'.',2)=8
Document will be refreshed on the server as a normal QV document, depending on the document and qlikview server settings.
Qlikview is so flexible:)!!!
Thank you for the explanation...will give it a whirl...
Thanks
Paul
Hi
Can you please assist I'm using the same model example but I need to switch between 2 tabs not 5. When I modify the model it stops working and doesn't switch.