Discussions

Expand all | Collapse all

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

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

    Posted 09-14-2017 18:29
    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#])


  • 2.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-14-2017 18:38
    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.


  • 3.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-14-2017 18:54
    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 )


  • 4.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-14-2017 19:54
    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 )


  • 5.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-14-2017 19:59
    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......


  • 6.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-14-2017 20:03
    Ok, I just tested mine and it works. Maybe some weird temporary chaching issue.


  • 7.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-21-2018 15:54
    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.


  • 8.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-21-2018 17:10
    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.


  • 9.  RE: When pressing the native green save button, can I redirect to a report in a different table?

    Posted 09-15-2017 11:05
    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.