Discussions

 View Only
  • 1.  Save and Keep working on different form

    Posted 09-04-2020 15:31
    Strange use case, but I have a situation where I would like to save and keep working, but on a different form. Then redirect to the original form (user can click a button to enter a field, so they are given them impression they are in a different place, sort of like an alternative to a pop up window).

    Ive seen some code in the forum for a save and continue working button, but not one to direct to a different form. Anyone ever done this?

    ------------------------------
    Mike Tamoush
    ------------------------------


  • 2.  RE: Save and Keep working on different form

    Posted 09-04-2020 17:15
    I think that this will work if you set the Advanced Table properties to "Save parent record automatically when a child record is created".

    URLRoot() & "db/" & dbid() & "?a=er&dfid=10&rid=" & [Record ID#]
    & "&NextURL=" & Urlencode(URLRoot() & "db/" & dbid() & "?a=er&rid=" & [Record ID#])

    What should happen is that you have dirtied the record and try to navigate away.  It should autosave and land on the same record in edit mode using form ID #10.  Then upon save the NextURL would be to the same record still in edit mode but on the regular default form.   "a=er".  Or if you want to land in display mode, the "a=dr".


    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------



  • 3.  RE: Save and Keep working on different form

    Posted 09-04-2020 18:07

    I forgot a very important part of the issue. I need this to work on a new record, so there is no Record ID yet.... :). Your code does save the record and take me to form 10, but since there is no record ID yet, it puts me on a new record.

    I came up with a pretty wonky (but successful) work around for my use case. I only had 1 field that I wanted my users to fill out, so I made a dummy related child table, with this same field duplicated on the dummy table form. The url button now performs an add record API, which saves the record, and once the add record api is finished, the QUickBase magic return code (& "&z=" & Rurl()) gets me back on the record from where I launched.

    Then I created an automation that says, when a record is added to the dummy table, go find the parent and copy that field to the parent.

    Seems like a lot of work for something where I could have my user simply make a selection on the original form lol. Maybe someone has a more elegant solution....



    ------------------------------
    Mike Tamoush
    ------------------------------