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

  • 2
  • 1
  • Question
  • Updated 2 months ago
  • Answered

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

Photo of Devona

Devona

  • 20 Points

Posted 3 years ago

  • 2
  • 1
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,204 Points 20k badge 2x thumb
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.
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
Photo of Adam Keever

Adam Keever

  • 1,632 Points 1k badge 2x thumb
Awesome. Thanks Dan.
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>
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
It worked fine for me.
Okay. Sounds good. Thanks Mate :)
Photo of Kelly

Kelly

  • 1,812 Points 1k badge 2x thumb
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.
Photo of Geoffrey

Geoffrey

  • 1,980 Points 1k badge 2x thumb
Hi Dan.  When creating a user defined page, is this the same as creating a new "code" page from within the quickbase settings area?
Photo of Geoffrey

Geoffrey

  • 1,980 Points 1k badge 2x thumb
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?
Photo of Ⲇanom the ultimate (Dan Diebolt)

Ⲇanom the ultimate (Dan Diebolt), Champion

  • 30,204 Points 20k badge 2x thumb
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.
Photo of Gary Boyd

Gary Boyd

  • 840 Points 500 badge 2x thumb
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);