Button to save and stay in EDITING record form

  • 0
  • 1
  • Question
  • Updated 1 year ago
  • Answered

I have a form in master Invoices table, which has an embedded Cost Of Materials details table. Cost of Materials is in Grid Edit format on the form, so one can add items quickly. Cost of Materials is only calculated when form is saved.

I would like to have a button for saving changes and returning to editing current Invoice (NOT view/display). If that is possible, I would be very grateful for your help.

Kind regards,

Arkady

PS: Happy Christmas and best wishes for New Year

Photo of Arkady

Arkady

  • 112 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,438 Points 50k badge 2x thumb
You can make your own button to Save, and make your own button to Edit.  But I don't recall ever seeing a simple solution to string them together.   If you search this site for

Save and continue

You will see the same question being asked in the past.
Photo of Arkady

Arkady

  • 112 Points 100 badge 2x thumb
Mark,

Thank you for responding. After searching everything, the answer that seems to work is:
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=339

However, I think Save text on the button should be replaced with an Update. Also, it seems to mess up return path, so after you completed editing and click Save at the top right of the screen, you stay in current record. It seems that I need to create another button to return to Mast record.

Let me know if you have any thoughts/comments.

Kind regards,

Arkady
PS: like the mountain view behind you. Makes me think of skiing, which I am looking forward to in January.
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,438 Points 50k badge 2x thumb
You would need to contact Dan Diebolt for questions on his magic.  Yes, it's time to start thinking about skiing.  I quite agree.
Photo of CamilleJ

CamilleJ

  • 0 Points
Arkady, thank you SO SO SO much for finding this info.  This seems to be the button I've been looking for.  And thanks, Dan Diebolt, too.  This allows editing a child in grid-edit while on the parent form and staying put on that form!  BTW, I was able to just change the button name within the coding from "Save & Edit" to "Save & Continue".  I'm not quite sure how to comply with the copyright other than putting a text note at the bottom of my form.  If you know of something else, I'd appreciate knowing.  Thanks again!
Photo of Ben L

Ben L

  • 120 Points 100 badge 2x thumb
Try this code in a formula text button:



"<a class='Vibrant Success' onclick=$('#RedirectURL').val(document.location.href.replace(/&rl=[a-z0-9]*/,''));$('[name=rl]').val('');$('#saveButton').trigger('click'); href='#'>Update & Keep Working</a>"
Photo of Ryan Blackwood

Ryan Blackwood

  • 124 Points 100 badge 2x thumb
This only seems to work on records that have already been saved.  Is there a code that will work on new records?  Save the record, then dump you back into edit mode on the same record?  Right now if I use this formula on a new record, it will save that record and dump you into edit mode in a new record (which then becomes an endless loop).
Thanks
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 67,268 Points 50k badge 2x thumb
Courtesy of Dan Diebolt

Dan the ultimate (Champion) replied to this question:
Is it possible to create a "Save and Keep Working" button from a formula URL field?

Put a Rich Text Formula field in the middle of your form with this definition:

"<div style='Vibrant Success' onclick=$('#footerSaveAndKeepWorkingMenuOption').click();>Save and Keep Working</div>"

When it is clicked it will trigger the clicking of the native Save and Keep Working button (even though it is not visible at the moment).  FWIW, this type of strategy of embedding JavaScript into a form which emulates a user clicking on a native features is safer than other methods of more directly invading the native markup and code.
Photo of Ryan Blackwood

Ryan Blackwood

  • 124 Points 100 badge 2x thumb
I think this is what I was looking for, however, div doesn't work (it doesn't create a button, just displays static text "Save and Keep Working").  

I changed it to:
"<a class='Vibrant Success' onclick=$('#footerSaveAndKeepWorkingMenuOption').click();>Save and Keep Working</a>"

This now gives me a button that works.  Thanks so much!