Forum Discussion

ArchiveUser's avatar
ArchiveUser
Qrew Captain
9 years ago

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

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

  • 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.
    • GauravSharma3's avatar
      GauravSharma3
      Qrew Commander
      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
  • 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>
    • GauravSharma3's avatar
      GauravSharma3
      Qrew Commander
      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
  • KellyBianchi's avatar
    KellyBianchi
    Qrew Assistant Captain
    I only need the page to refresh every 5 minutes. How would I express that in this formula.
  • That formula will refresh every 15 seconds. 15 minutes would be 900000 milliseconds.
  • Hi Dan.  When creating a user defined page, is this the same as creating a new "code" page from within the quickbase settings area?
  • 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?
  • 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.
  • GaryBoyd's avatar
    GaryBoyd
    Qrew Assistant Captain
    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);
  • I've used this on my own dashboard and everything is working but how do I change it so that it refreshes daily?
    • AustinK's avatar
      AustinK
      Qrew Commander
      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?
    • HowardFu's avatar
      HowardFu
      Qrew Cadet
      Correct - the data would only change daily. However, now I want to update every hour....so same question. How would I do that?
    • AustinK's avatar
      AustinK
      Qrew Commander
      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.