# Scrolling Dashboard Pages

**URL:** <https://discourse.nodered.org/t/scrolling-dashboard-pages/3282>\
**Category:** Dashboard\
**Created:** [19 September 2018 19:45 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282 "2018-09-19T19:45:15Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![arneym](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arneym/32/54_2.png) [@arneym](https://discourse.nodered.org/u/arneym)\
**Post date:** [19 September 2018 19:45 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/1 "2018-09-19T19:45:15Z")

</div>

I have many dashboard pages in my project. Some pages are for a specific machine, and some are for a specific department. Is there a node or solution on how to scroll through the pages on my dashboard?

Example:  
Total number of pages: 25  
Number of pages to be scrolled: 5  
Page numbers to be scrolled: /ui/#/0, /ui/#/3, /ui/#/7, /ui/#/9, /ui/#/13

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![craigcurtin](https://avatars.discourse-cdn.com/v4/letter/c/94ad74/32.png) [@craigcurtin](https://discourse.nodered.org/u/craigcurtin)\
**Post date:** [19 September 2018 20:35 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/2 "2018-09-19T20:35:46Z")

</div>

Automatically you mean ? On a timed basis like an info kiosk type display ?

Craig

---

<div class="post-metadata">

**Author:** ![arneym](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arneym/32/54_2.png) [@arneym](https://discourse.nodered.org/u/arneym)\
**Post date:** [19 September 2018 20:50 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/3 "2018-09-19T20:50:41Z")

</div>

Yes, automatically scroll after a set time in seconds.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [19 September 2018 21:02 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/4 "2018-09-19T21:02:52Z")

</div>

The ui\_control node can be used to control which tab is being displayed. That's your starting point for a flow that sends appropriate messages to that node at regular intervals.

---

<div class="post-metadata">

**Author:** ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)\
**Post date:** [19 September 2018 21:56 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/5 "2018-09-19T21:56:29Z")

</div>

Hi Mike,

This flow should work. The function node generates a cyclic output for each of the tab numbers hard coded in the array tabs.

```auto
[{"id":"c585b65b.a49048","type":"tab","label":"Flow 4","disabled":false,"info":""},{"id":"1636eb6b.9aa1c5","type":"ui_ui_control","z":"c585b65b.a49048","name":"","x":500,"y":120,"wires":[[]]},{"id":"cce3d906.6760f8","type":"inject","z":"c585b65b.a49048","name":"","topic":"","payload":"","payloadType":"date","repeat":"3","crontab":"","once":true,"onceDelay":0.1,"x":150,"y":120,"wires":[["523a4a55.4d53a4"]]},{"id":"523a4a55.4d53a4","type":"function","z":"c585b65b.a49048","name":" [0,3,7,9,13]","func":"let tabIndex = context.get(\"tabIndex\") || 0;\nlet tabs = [0,3,7,9,13]; \n \nfunction selectNextTab() \n{\n\n return tabs[tabIndex++] || (tabIndex=0, tabs[tabIndex++]); \n}\n\nmsg.payload = {\"tab\" : selectNextTab()};\ncontext.set(\"tabIndex\", tabIndex);\nreturn msg;\n","outputs":1,"noerr":0,"x":310,"y":120,"wires":[["78438012.11729","1636eb6b.9aa1c5"]]},{"id":"78438012.11729","type":"debug","z":"c585b65b.a49048","name":"","active":true,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","x":510,"y":160,"wires":[]}]

```

 ![r-01](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/3/3f06bb4caba180c9ced0096a6a864919bd097b56.png)

---

<div class="post-metadata">

**Author:** ![arneym](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arneym/32/54_2.png) [@arneym](https://discourse.nodered.org/u/arneym)\
**Post date:** [20 September 2018 12:13 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/6 "2018-09-20T12:13:31Z")

</div>

Thank you @knolleary and @Andrei! This worked perfectly.  
I found another issue on my end. Like I said earlier, I have 25 tabs that show many other processes in our manufacturing plant. I have a Raspberry Pi and a TV at each process. I have the default home page of each process opening to their respective tab. Can I have each Raspberry Pi/ TV scroll the tabs that are specific for their respective process?

Example:

1.) Main Pi runs Dashboard

2.) Pi from Turning department scrolls through tabs [0,9,10,11,12,13] on Main Pi.

3.) Pi from Grinding department scrolls through tabs [1,7,8]

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [20 September 2018 15:06 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/7 "2018-09-20T15:06:16Z")

</div>

If they are separate Pi then they are presumably running their own flows... so just customise the function in each flow to each Pi... ?

There are of course more sophisticated ways to allow the same flow to run on each and pick up and external environment number in order to customise each - but no idea if that level of sophistication is required here yet.

---

<div class="post-metadata">

**Author:** ![arneym](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arneym/32/54_2.png) [@arneym](https://discourse.nodered.org/u/arneym)\
**Post date:** [20 September 2018 16:02 UTC](https://discourse.nodered.org/t/scrolling-dashboard-pages/3282/8 "2018-09-20T16:02:45Z")

</div>

You nailed it on the head @dceejay ! I am currently running a behemoth node red dashboard on one Windows PC and pointing the Raspberry Pis to the Windows PC Site. I noticed that he performance is slow on the Windows NodeRed instance, probably because I have 28 tabs.

I will export the flows that I need to each process' Pi. I will just need to create a few higher level views on the Windows PC Dashboard for mobile and Manager viewing.

Thanks,  
Mike
