Discussions

Expand all | Collapse all

Change the Redirection

  • 1.  Change the Redirection

    Posted 06-28-2018 19:31
    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)


  • 2.  RE: Change the Redirection

    Posted 06-28-2018 19:42
    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


  • 3.  RE: Change the Redirection

    Posted 06-28-2018 19:50
    WOW Thanks

    You are the best of the best....

    Thanks a lot