Creating a Delay of page reload

  • 0
  • 1
  • Question
  • Updated 1 month ago
  • In Progress
i have a Project table connected to an Issues table. In the Project form I have a button and I use it to edit the record and trigger an automation. I have the button set to refresh the page but my embedded report loads instantaneously(even on another tab). It doesn't do this because I don't know how to set the form correctly but it does this because my form is set as editable. An editable report does not follow the same rules on loading.
I am trying to put a delay on the button reload command like below. Set like the example the button will function but not delay. Does anyone have an idea of how I can change the code to get the delay working.I don't even know if the delay will help at all but it would be nice to see it delay.

 "javascript:" & "$.get('" & $URL & "',function(){" & "setTimeout(location.reload(true), 3000);" & "});"& "void(0);" 
Photo of Jason Johnson

Jason Johnson

  • 150 Points 100 badge 2x thumb

Posted 1 month ago

  • 0
  • 1
Try using a headerless pop-out window function like this

onclick=\"var'"&$URL&"', 'newwindow', 'width=300,height=275');setInterval(function() {if (a.closed) {window.location.reload();}},500);

If you're trying to solve the same problem I was, you're wanting to keep the page from reloading before the automation has a chance to complete :)

try that with your own url string and see if that solves it for you.