Forum Discussion

jrossausiscom's avatar
jrossausiscom
Qrew Assistant Captain
5 years ago

Time Delays in Scripts?

With formula's, specifically URL formulas, is there a way to add some kind of delay?  I need something to give my automation time to run.  It would also be useful to have some kind of UI feed back for the user.  It would be great if we could even display a countdown on the screen.

"Processing... 5... 4... 3... 2... 1... Reloading!"

Something like that.

------------------------------
John Ross
------------------------------
  • If it's a single URL call you can use this syntax, where you have previously defined the URL API.  But it will not work when there is a succession of URL calls all nested with the "&rdr=" redirect syntax.

    In the example below there is a 2 second delay to refresh the page. But no countdown timer.


    // slow refresh
    "javascript:" &
    "$.get('" &
    $URL &
    "',setTimeout(function(){" &
    "location.reload(true);" &
    "},2000));"
    & "void(0);"

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------
    • jrossausiscom's avatar
      jrossausiscom
      Qrew Assistant Captain
      Interesting, but this is a delay to refresh correct?  Can this be used to delay the redirecting of the URL?  (And yes it is just one, takes you to a different form)

      ------------------------------
      John Ross
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        That code will just refresh the page after a delay, it will not redirect.

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------