Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

displaying multiple sheets in timely fashion

hi

May be a 'stupid' newbie question but here it is.

I have a document with mutliple sheets each contain different figures/data. I need to display them as a repeated loop each for a period of time.

I managed to do it using the now() command and 3 variables vsecond, vminute, vtimer

vminute is checked if it is odd or even. vtimer=vsecond + 0 (odd) or +60 (even) this gave me a 2' loop.

each sheet display with a condition which is:

first: 0<vtimer<40

second: 40<vtimer<80

third: 80<vtimer<120

THis seems to work but I am limited to 2' loop which is no good for later and not very flexible and  Now() according the manual should be avoided been system heavy.

Is there a better way to do it?

thanks

andre

2 Replies
jjfabian
Partner - Creator III
Partner - Creator III

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

Not applicable
Author

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

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

// used to display timing value in sheet

//LOAD

//      [Seconds] as [mySec]

//FROM

//(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