Skip to main content
Question

Change the Redirection

  • June 28, 2018
  • 0 replies
  • 27 views

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)
This topic has been closed for replies.

Forum|alt.badge.img+12
  • Registered
  • June 28, 2018
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

  • Author
  • Registered
  • June 28, 2018
WOW Thanks

You are the best of the best....

Thanks a lot