Forum Discussion

RobinCC's avatar
RobinCC
Qrew Cadet
7 years ago

When pressing the native green save button, can I redirect to a report in a different table?

I have a URL formula button on a report in my TEAMS table that when pressed allows me to edit the current record by taking me to a secondary form (not the main form) in the TEAMS table.  Upon pressing the native green save button after filling out this form, I would like to redirect to a report in the TASKS table.  Is this possible?  If so, how? 

Here is my code so far.  It takes me to the correct form, but when I press save it takes me to the same TEAMS table report I started on.  I don't know what to add to redirect to the desired report in the TASKS table.   

URLRoot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" & ToText([Record ID#])

8 Replies

  • MCFNeil's avatar
    MCFNeil
    Qrew Captain
    You will not be able to do this will the native green save button. 

    You will need to make a new save button and add it to the form.

    The formula for the save button will use the "LinkAway" function.

    Here is an example of that:
    "<a  class='Vibrant Success' href='javascript:LinkAway(\"" & URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=success.html" & "\");' >Submit and redirect</a>"
    // This works because you have turned on the table's advance settings, "Save parent record automatically when a child record is created."
    // This also is borrowing the LinkAway that gets automatically added for formula url fields.  We are invoking it here so when we are directed to the success.html page the record is first saved.
  • Here is another solution which might be a better user interface as the user would not have to click a special save button.


    var text URLONE = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" & ToText([Record ID#]);

    var text URLTWO = URLRoot() & "db/" & [_DBID_my table name] & "?a=q&qid=xx";

    $URLONE
    & "&NextURL="  & URLEncode($URLTWO )
    • RobinCC's avatar
      RobinCC
      Qrew Cadet
      Hi Mark,

      When I tried this method, it did not redirect to the TASK table.  It went back to the starting point in the TEAMS table.   Is there some other setting I need somewhere in my app or maybe I have a glitch?    


      var text URLONE = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" & ToText([Record ID#]);

      var text URLTWO = URLRoot() & "db/" & [_DBID_TASKS] & "?a=q&qid=7";

      $URLONE
      & "&NextURL="  & URLEncode($URLTWO )
    • RobinCC's avatar
      RobinCC
      Qrew Cadet
      Strangely, if I go into the form properties briefly and then come back out, it DOES work.  .  I'm guessing this has to some kind of glitch......
    • QuickBaseCoachD's avatar
      QuickBaseCoachD
      Qrew Captain
      Ok, I just tested mine and it works. Maybe some weird temporary chaching issue.
  • KingslySamuel1's avatar
    KingslySamuel1
    Qrew Assistant Captain
    If it is a temporary issue, then it could be because of someone else worked on the application at the same time you are in updating a record.