Skip to main content
Question

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

  • September 14, 2017
  • 0 replies
  • 111 views

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

  • Registered
  • September 14, 2017
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 )

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.