Forum Discussion

MickeyPotito's avatar
MickeyPotito
Qrew Member
3 days ago
Solved

Refresh Code Page

Good day everyone!

I'm trying to set up a way to automate a page refresh. Previously we were using an HTML code page with

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

 

This worked for a little bit, but stopped working some months ago. I added the code as a web page url as instructed in previous Qcrew discussions. However now it just states 

"We can't find what you were looking for. Either it has been deleted, or the link that brought you here is wrong."

Has anyone found a work around for this? I'm trying to use it as a workflow solution that auto updates our main page that's a Kaban Report to display on a bigger screen for the work force.

  • I am able to refresh an old style homepage with a code page with this code
    <script>
    setTimeout(function(){
    parent.location.reload(1);
    }, 1800000);
    </script>

     

    Then I put a webpage widget on an Old style dashboard with this code to call the code page

    My company.quickbase.com/db/xxxxxxxx?a=showpage&pageID=24

     

    In my use case I actually want to show a new style dashboard in auto refresh mode so what I did is I put a webpage widget suffix with &IFV=1 has an embedded webpage pointing to the new dashboard but embedded on an old dashboard because it seems that only the old dashboards will refresh 

9 Replies

  • I am able to refresh an old style homepage with a code page with this code
    <script>
    setTimeout(function(){
    parent.location.reload(1);
    }, 1800000);
    </script>

     

    Then I put a webpage widget on an Old style dashboard with this code to call the code page

    My company.quickbase.com/db/xxxxxxxx?a=showpage&pageID=24

     

    In my use case I actually want to show a new style dashboard in auto refresh mode so what I did is I put a webpage widget suffix with &IFV=1 has an embedded webpage pointing to the new dashboard but embedded on an old dashboard because it seems that only the old dashboards will refresh 

    • MickeyPotito's avatar
      MickeyPotito
      Qrew Member

      As always Mark, you are a magician! This definitely worked. I had an inkling that it was the new dashboards that were messing it up. 

  • Denin is probably on to something. Have you tried forcing it to go to the dashboard location instead of just doing a refresh?

    const parentURL = window.parent.location;
    // or
    // const parentURL = 'yourdashboardURL';
    parent.location.href = parentURL;

    • MickeyPotito's avatar
      MickeyPotito
      Qrew Member

      Hey John thanks for the reply!

       

      I'm feeling a little silly, how would I go about implementing this? Would this fully replace my above coding? Or would it be added onto it? 

      • John_Perkins's avatar
        John_Perkins
        Qrew Trainee

        You'd do it like this:

        <script>
        setTimeout(function(){
            const parentURL = window.parent.location;
            parent.location.href = parentURL;
        }, 60000);
        </script>

        Alternatively, you'd use this, but replace yourdashboardURL with the URL of your Dashboard (i.e. https://domain.quickbase.com/nav/app/appid/action/appoverview). Either should work, but since there seems to be an issue with the redirect, I'd try to force it to a specific URL instead of just doing a reload.

        <script>
        setTimeout(function(){
            const parentURL = 'yourdashboardURL';
            parent.location.href = parentURL;
        }, 60000);
        </script>

  • Denin's avatar
    Denin
    Qrew Cadet

    That sounds like there is a problem with the URL the page goes to after the refresh occurs. What is the page you are trying to refresh?

    • MickeyPotito's avatar
      MickeyPotito
      Qrew Member

      Thanks for the reply Denin!

      It's a dashboard I'm trying to refresh. It holds multiple Kanban reports for various types of tickets we do.

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        The good news is I did this for a client. Refreshing a new style dashboard. The bad news is I don't remember how I did it so when I get a chance, maybe tonight I will look back and reverse engineer how I did it.