-
Re: displaying multiple sheets in timely fashion
Jakob Fabian Dec 14, 2011 7:10 AM (in response to andrelabbe)Hi Andre,
try looking at this discussion.
http://community.qlik.com/message/171899#171899
The QVW file in that discussion uses a variable to create a live second ticker.
The display of the sheets is then triggered by the show conditions that use these seconds.
Just check it out.
Good luck,
Jakob
-
displaying multiple sheets in timely fashion
andrelabbe Dec 14, 2011 11:31 AM (in response to Jakob Fabian )ok thanks for the info. I have solved it and here is ohw I did it.
created a csv called 'timing.csv' with 1 column as follow
Seconds
10
20
5
in Script I created a tab called timing with this code inside:
[Timing]:
LOAD
recno() as Tab,
rangesum(Seconds,peek(Seconds)) as Seconds
FROM
[e:\test\timing.csv](txt, codepage is 1252, embedded labels, delimiter is ',', msq);
// used to display timing value in sheet
//LOAD
// [Seconds] as [mySec]
//FROM
//[e:\test\timing.csv](txt, codepage is 1252, embedded labels, delimiter is ',', msq);
[Show]:
LOAD
'=' & concat('if(vSeconds<' & Seconds & ',' & Tab,'
,') & repeat(')',max(Tab)) as Show
,'=mod(round((now()-now(2))*86400),' & max(Seconds) & ')' as Seconds
RESIDENT Timing;
LET vShow = peek('Show');
LET vSeconds = peek('Seconds');
DROP TABLES [Show], [Timing];
let vActivated = 0;
In tools Edit Module I added this code:
Sub ReloadData
ActiveDocument.ClearAll
ActiveDocument.reloadex 0,1
End Sub
in each script I added in General - Conditional this:
vShow=1 or $(vActivated)=1
vShow: 1 of first sheet, 2 for Second, etc....
vActivated is used to stop the slideshow
in each sheet title (text) I added an Action 'set Variable'
vActivated with value =if($(vActivated)=0,1,0)
On the last sheet in Trigger OnleaveSheet I have added this action:
Run Macro
Macro name: ReloadData
To change the timing no need to edit the code
just change value in csv file
at the next reload the timing will be updated
-