Change the Redirection

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered
How can I avoid that it should not open a new page while running the following code?

I just want to refresh the current page 


--------------------------------------------------------------


var text NewToggle = If([Active]="Yes","No","Yes");


var text URLone = URLRoot() & "db/" & Dbid()  & "?act=API_EditRecord&rid=" & [Record ID#]
& "&_fid_20=" & $NewToggle;

var text URLtwo = URLRoot() & "db/" & [_DBID_SUPPLIERS] & "?act=API_RunImport&ID=10";



$URLONE
& "&rdr=" & URLEncode($URLTWO)
Photo of Sam Krausz

Sam Krausz

  • 470 Points 250 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of QuickBasePros (Laura Thacker)

QuickBasePros (Laura Thacker), Champion

  • 6,396 Points 5k badge 2x thumb
It is opening the response to the Import-variable because you do not have anywhere else for Quick Base to redirect to, so you need a third variable to redirect Quick Base to a different place after running the API_RunImport variable.

var text URLThree=URLRoot() & "db/" & Dbid() & "?a=dr&rid="&[Record ID#]

Then your url will be:

$URLOne & "&rdr=" &
URLEncode($URLTwo & "&rdr=") &
URLEncode(URLEncode($URLThree))

Note - if your table has a custom Key field; then your &rid="&[Record ID#] should be &key="&[Userid] instead
Photo of Sam Krausz

Sam Krausz

  • 470 Points 250 badge 2x thumb
WOW Thanks

You are the best of the best....

Thanks a lot