Discussions

 View Only
Expand all | Collapse all

How do I set a refresh interval on a dashboard page?

  • 1.  How do I set a refresh interval on a dashboard page?

    Posted 05-05-2016 20:24

    I'm very new to QuickBase, and I'm having a hard time figuring out how to auto-refresh a dashboard.

    One of my dashboards is going to be on a standalone display, so I need to make sure it updates every couple of minutes without user interaction.

    How do I do this?

    Thanks in advance,

    Devona



  • 2.  RE: How do I set a refresh interval on a dashboard page?

    Posted 05-05-2016 20:45
    Create a user defined page named refresh.html with this code:

    <script>
      setTimeout(function(){
         parent.location.reload(1);
      }, 5000);
    </script>

    Then place the page on the bottom of your application dashboard using the web page widget option. You can adjust the timer (5000 milliseconds) to suit your needs. The reason to put it at the bottom is to not overtake the information currently displayed on the dashboard.


  • 3.  RE: How do I set a refresh interval on a dashboard page?

    Posted 11-16-2017 07:51
    Hi Dan,

    Can I use the same thing in the record of the table?

    I need to refresh out the record if some predefined conditions meet. I know it is possible with your world famous IOL technique but, need your thoughts on it.

    Thanks,
    Gaurav


  • 4.  RE: How do I set a refresh interval on a dashboard page?

    Posted 04-18-2019 15:35
    Awesome. Thanks Dan.


  • 5.  RE: How do I set a refresh interval on a dashboard page?

    Posted 05-05-2016 21:07
    Dan is correct and it is Dan's code that I use



    Here are my more detailed notes.

    Mark,
     
    It�s like you said. You make a user defined html page. Then to see its URL click the magnifying glass icon. The page opens with the URL in the pop up window�s address bar.  (ie that means make a code page using the settings like you would use to make a dashboard page except choose a Code page as the page type)
     
    Pull an html widget into the dashboard with that user defined page URL. I put my widget at the bottom so as not to take up valuable top of browser real estate.
     
    Works like a charm.

    e.g. URL that gets pasted into the dashboard widget will look like  is yqc.quickbase.com/db/be53mi1234?a=dbpage&pageID=4


    This is what goes in the Code Page

    Content:
    <script>
      window.setInterval(function() {
        window.top.location.reload(true);
      }, 15000);
    </script>


  • 6.  RE: How do I set a refresh interval on a dashboard page?

    Posted 11-22-2017 07:58
    Mark,

    Do we face any performance issue or any slowness issue after applying the above code? because I want to use this code in the record and want to refresh the page when certain conditions meet.

    Thanks,

    Gaurav


  • 7.  RE: How do I set a refresh interval on a dashboard page?

    Posted 11-22-2017 12:19
    It worked fine for me.


  • 8.  RE: How do I set a refresh interval on a dashboard page?

    Posted 11-22-2017 12:20
    Okay. Sounds good. Thanks Mate :)


  • 9.  RE: How do I set a refresh interval on a dashboard page?

    Posted 10-02-2016 01:35
    I only need the page to refresh every 5 minutes. How would I express that in this formula.


  • 10.  RE: How do I set a refresh interval on a dashboard page?

    Posted 10-02-2016 01:43
    That formula will refresh every 15 seconds. 15 minutes would be 900000 milliseconds.


  • 11.  RE: How do I set a refresh interval on a dashboard page?

    Posted 10-10-2016 13:04
    Hi Dan.  When creating a user defined page, is this the same as creating a new "code" page from within the quickbase settings area?


  • 12.  RE: How do I set a refresh interval on a dashboard page?

    Posted 10-10-2016 13:15
    I seemed to have got this right, but the script runs to refresh the entire page.  Is there no way of having it just refresh the specific report/table within the dashboard?


  • 13.  RE: How do I set a refresh interval on a dashboard page?

    Posted 10-10-2016 19:52
    Reports are included on the page inside a simple <div> rather than inside an <iframe> so you have to refresh the page in order to refresh the report. Unless you have performance problems or absolute requirements to refresh just the report I would go with the solution you have now. If you need further help refreshing on the the report information feel free to contact me off-world using the information in my profile.


  • 14.  RE: How do I set a refresh interval on a dashboard page?

    Posted 09-15-2018 14:25
    Is it possible to use this technique to redirect to a different form in your QB app? I'd like to setup an auto redirect to forms. The redirect will be to different tables, when a user initially logs in, based on the user role and other logic.
    Setting the delay to 1ms will seem instant, but is there a way to automatically go to a different page, which is a form, rather than a reload? 2 snippets relating from above:

    parent.location.reload(1);

    window.top.location.reload(true);


  • 15.  RE: How do I set a refresh interval on a dashboard page?

    Posted 07-02-2019 17:51
    I've used this on my own dashboard and everything is working but how do I change it so that it refreshes daily?


  • 16.  RE: How do I set a refresh interval on a dashboard page?

    Posted 07-02-2019 18:31
    Generally it is used to update the page every few minutes or even seconds.

    Out of curiosity what would be your use case for updating the page once a day? Does your data not change from the start of the day?


  • 17.  RE: How do I set a refresh interval on a dashboard page?

    Posted 07-02-2019 18:37
    Correct - the data would only change daily. However, now I want to update every hour....so same question. How would I do that?


  • 18.  RE: How do I set a refresh interval on a dashboard page?

    Posted 07-02-2019 19:03
    Just change the timeout to be an hour in milliseconds. One second = 1,000 milliseconds so one hour = 3600000 milliseconds. In the script up top just change the bolded 5000 to the number you want.


  • 19.  RE: How do I set a refresh interval on a dashboard page?

    Posted 07-02-2019 19:07
    thank you! Just curious, if I want to do daily, do I just add a ton of zeros or can the units be changed so that they are not milliseconds.


  • 20.  RE: How do I set a refresh interval on a dashboard page?

    Posted 07-02-2019 19:28
    I'm not sure If there is a better way but yes you just have a huge number in the end if you want to do days at a time.

    I think the code works well for keeping data up to date with many refreshes throughout the day but it is not the best at refreshing once a day. I'm sure you could change it but the main issue with using this to refresh once a day is the user will have to trigger the script 24 hours before it will refresh the page. So the user would have to load the page at 7am to make sure it refreshed at 7am again tomorrow. If they refresh the page manually during the day it will reset the timer to be 24 hours(or whatever you set) from that point.

    Here is a good site I found for converting standard units like hours, minutes, seconds to milliseconds. http://sstut.com/javascript/convert-hours-minutes-seconds-to-milliseconds.php