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

  • 0
  • 1
  • Question
  • Updated 2 months ago
  • In Progress
  • (Edited)
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#])
Photo of Robin CC

Robin CC

  • 120 Points 100 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,438 Points 20k badge 2x thumb
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.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
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 )
Photo of Robin CC

Robin CC

  • 120 Points 100 badge 2x thumb
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 )
Photo of Robin CC

Robin CC

  • 120 Points 100 badge 2x thumb
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......
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
Ok, I just tested mine and it works. Maybe some weird temporary chaching issue.
(Edited)
Photo of Javier Martinez

Javier Martinez

  • 218 Points 100 badge 2x thumb
Where would you enter this formula?  Sorry for the "noob" question.  I'm new to app building and having issues when a certain role clicks save and close it is sending them to the wrong home page.  I've checked the role and home page settings and they are set up correctly.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
The formula I posted was to edit a record on a report on one table, but upon save redirect to a report on a different table.  That was the original question on this thread.  I will  respond to your question on its own thread as i see that you have a thread already going.
Photo of Kingsly SD Samuel

Kingsly SD Samuel

  • 776 Points 500 badge 2x thumb
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.