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

Automatic Switching of Tabs in Ajax Client

I currently have a QV desktop application that runs on a large screen.

Every 15 seconds, it switches from one tab to the next using a condition on the tab that looks at the time.

Can anyone suggest how I could achieve a similar function using the Ajax client

Thanks

Dave

7 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Dave

Define the following variables:

Set vDelay = 15; // duration of screen in seconds

Set vSheets = 10;  // number of sheets

Set vShow = =ceil((frac(now())*86400/(vSheets*vDelay)-floor(frac(now())*86400/(vSheets*vDelay)))*(vSheets));

(the double = sign is not a misprint)

Now for each sheet, set the conditionally show to

(vShow = 1)   // for the first sheet

(vShow = 2)   // for the next sheet

... and so on.

vShow is updated continuously and counts from 0 to vSheets-1, incrementing every vDelay seconds.

This approach should work in both the plugin and in Ajax.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

Can you please explain the logic behind the vShow function???

I know that it works but i dont properly understand how ....why do we multiply by 86400 first of all...

Thanks in advance

Regards,

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

vShow increments by one every vDelay seconds up to vSheets, where it starts at 1 again. 86400 is the number of seconds in a day, so this is converting the time portion of now() to seconds after midnight. The calculation is then done in seconds.

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Jonathan - I've tried your approach to this but it doesn't seem to loop back through in AJAX. Have you made any more progress on this since this post?

Not applicable
Author

Has anyone had any luck with this? I am having the same issue with AJAX.

ashfaq_haseeb
Champion III
Champion III

Hi,

You need to have a look at this document on how to configure the same on AJAX.

Let me know if that worked.

Regards

ASHFAQ

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi Emilio,

How I have gone about this in the past is by having QlikView display in an iFrame and have an HTML timer refreshing the host page.  The QlikView URL can then have a parameter to set a field value that fires a trigger to show the correct page.

See this post on Ajax parameters, and my comment on the third page around getting triggers to fire.

http://community.qlik.com/blogs/qlikviewdesignblog/2014/07/11/ajax-and-url-parameters

Hope that helps,

Steve