Skip to main content
Question

Create ""Save"" button that saves the record and then displays record in view mode

  • November 13, 2018
  • 0 replies
  • 586 views

I want to create a simple "Save" button which saves the new record and then displays it in view mode.  Their doesn't seem to be an API command that does this.  This must be super simple, but I am not strong in the "code department.
This topic has been closed for replies.

this code as a formula Rich text field will make an extra save button to put on your form.

"<a id='saveButton' class='Vibrant Success' onclick='DoSave()' href='#'>WhatEverYouWantYourButtonToSay</a>"

The colors can be controlled by the words. Ignore the formula, I'm just showing you the colors available.  But I think that the success which used to be green got turned into blue when we had the purple day rebranding at Quick Base a few months ago.



List("&nbsp;",
    "<a class='Vibrant'>Vibrant</a>", // regular grey button
    "<a class='Vibrant Alert'>Vibrant Alert</a>", // yellowish
    "<a class='Vibrant Danger'>Vibrant Danger</a>",  // red
    "<a class='Vibrant Primary'>Vibrant Primary</a>", // blue
    "<a class='Vibrant Snowy'>Vibrant Snowy</a>",  // white
    "<a class='Vibrant Success'>Vibrant Success</a>" // green



  • Author
  • Quickbase Alumni
  • November 13, 2018
Thank you!  Works like a charm.  Now, what if I want to end up at the "view" mode of the record I just saved?

I don't understand. is the issue that you are landing back on a report after adding a record. Where are you landing that is a problem.  Where are you launching the Add Record from?

  • Author
  • Quickbase Alumni
  • November 13, 2018
I am launching the "Add Record" from a Parent table (Properties) URL button to create the new child record "Work Order". 
In "Work Order, I have placed my new save button. 
When I click the new save button, I want to end up looking at the record that I just saved (rather than the Parent record from which it was created)


The fix is to change your ad child button. Can you post your code for at child and I�ll show you how to fix it.

  • Quickbase Alumni
  • November 13, 2018

Tarury, What you described is the default behavior of the add new record button that you see on the table home page. The URL behind it is db/<dbid>?a=nwr


This is designed to save the new record and then open it in view mode.

Tauray

Are you launching off a parent record to add a child or are you launching off the dashboard?

  • Author
  • Quickbase Alumni
  • November 13, 2018
I am not launching off the dashboard - it must be created from the parent record.