EducationSoftwareStrategy.com
StrategyCommunity

Knowledge Base

Product

Community

Knowledge Base

TopicsBrowse ArticlesDeveloper Zone

Product

Download SoftwareProduct DocumentationSecurity Hub

Education

Tutorial VideosSolution GalleryEducation courses

Community

GuidelinesGrandmastersEvents
x_social-icon_white.svglinkedin_social-icon_white.svg
Strategy logoCommunity

© Strategy Inc. All Rights Reserved.

LegalTerms of UsePrivacy Policy
  1. Home
  2. Topics

Automatically Change Pages of a Dossier Every Two Seconds


Community Admin

• Strategy


Use a code snippet to display a dossier on a large screen or as a screensaver. This is great for keeping up with all your financial or sales data while walking around the office!

Starting with the release of Strategy ONE (March 2024), dossiers are also known as dashboards.
Automatically Change Pages of a Dossier Every Two Seconds
Note: The code only works in Strategy Library, and not in Web. The code needs to be placed in an HTML Container, and only on the first page of your dossier. 
This code snippet loops through all the pages of a dossier. This can be used to display a dossier on a large screen or as a screensaver. Great to keep up with all your financial or sales data while walking around the office! Place the code on the first page within the dossier to make it work. When the last page is reached it loops back to the first one again. The time period for which a dossier page is displayed is set to 2 seconds in the sample but can be changed to any number (in a factor of milliseconds). Check it out!
What's the code snippet? 
 
<script>
setInterval(changePage, 2000); // Wait 2 seconds
 
function changePage(){
   currentPage = dossier.dossierCmd.getCurrentPage();   chapters = dossier.dossierCmd.getChapters();
 
   for (x = 0; x < chapters.length; x++){
   //console.log(chapters[x].name);
 
       for (y = 0; y < chapters[x].pages.length; y++){
           //console.log(chapters[x].pages[y].name);
           if (chapters[x].pages[y].key == currentPage.key) {
               if (y < chapters[x].pages.length-1)
                   dossier.dossierCmd.gotoPage(chapters[x].pages[y+1]);
             else if (x < chapters.length-1)
                   dossier.dossierCmd.gotoPage(chapters[x+1].pages[0]);
               else
             dossier.dossierCmd.gotoPage(chapters[0].pages[0]);
           }
       }
 
   }
}
changePage;
</script> 
 
This customization is provided as a convenience to Strategy users and is only directly applicable to the version stated. While this code may apply to other releases directly, Strategy Technical Support makes no guarantees that the code provided will apply to any future or previous builds. In the event of a code change in future builds, Strategy Technical Support makes no guarantee that an updated version of this particular customization will be provided. For enhancements to this customization or to incorporate similar functionality into other versions, contact your Account Executive to inquire about Strategy Consulting assistance.
 
Have other questions? Feel free to start a discussion or reach out to your Support liaison to open a case!
 
Want to upgrade to Strategy 2019? Visit the Strategy website!
 


Comment

0 comments

Details

Knowledge Article

Published:

March 21, 2019

Last Updated:

March 21, 2024