Discussions

Expand all | Collapse all

Button to save record, and edit different record in same table, and redirect

  • 1.  Button to save record, and edit different record in same table, and redirect

    Posted 04-22-2018 03:01
    I am using ?a=API_GenAddRecordForm to open a new record to add. Once I hit Save on the form of this new record, I would like to:
    1. Save this record and 
    2. Edit a different record in the same table (without opening it)
    3. Return to where I came from

    Tried this without luck. Looking at the URL, it stops at    &onclick=

    "<a class='Vibrant Primary' style=\"width:180px; text-align: center;\"  href='" & 
    "db/" & [_MY_TABLE] & "?a=API_EditRecord" &
       "&_fid_10=false" &
       "&rid=" & [Old Record number to be inactivated] &
       "&onclick='DoSaveAdd()'" &
    "'>Save Edit Return</a>"

    Thank you


  • 2.  RE: Button to save record, and edit different record in same table, and redirect

    Posted 04-22-2018 15:04
    It�s probably pretty easy to do if you first edit the record, then put up your Add Record Form.

    It would be like

    var Text EditMyRecord = put the url here to edit. ;

    Var Text PutUpAddRecordForm = put your url here to GenAddRecord;

    $EditMyRecord
    & "&rdr=" & Urlencode($PutUpAddRecordForm)


  • 3.  RE: Button to save record, and edit different record in same table, and redirect

    Posted 04-22-2018 21:23
    Thank you, however I can't edit the old record first. Only if a box is checked on the new record, then I need to inactivate a previous record.


  • 4.  RE: Button to save record, and edit different record in same table, and redirect

    Posted 04-29-2018 10:26
    Thought I'd see if anyone else had an idea before posting a support case.


  • 5.  RE: Button to save record, and edit different record in same table, and redirect

    Posted 04-29-2018 10:29
    Sorry I don�t think I saw your previous post.

    Does the record you are editing with GenAddRecird know the Record iD of the record to be edited. If so, you can use an Action.


  • 6.  RE: Button to save record, and edit different record in same table, and redirect

    Posted 04-30-2018 10:20
    Thank you. That seems like a simple solution.  I have the record ID of the record I wish to edit. 
    Combining with your post here should give me the full solution. 
    https://community.quickbase.com/quickbase/topics/what-triggers-the-selection-to-edit-a-record-with-a...