Skip to main content
Question

How can I add a URL button that will allow users to save/update and stay in current record and form? Currently returns to form select form.

  • March 30, 2016
  • 0 replies
  • 163 views

Currently I have a Site Visit table with multiple forms that the users select when created a record.  After they save the record Quickbase takes them back to the form select form.  (I inherited this)  How can I add a URL button on the form to save/update changes to the record and keep the user in the current form and record.

This topic has been closed for replies.

Try this format. This will edit using form ID #10 and then redisplay after Save on that same form.

URLRoot() & "db/" & Dbid() &  "?a=er&dfid=10&rid=" & ToText([Record ID#]) 

& "&nexturl=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&dfid=10&rid=" & ToText([Record ID#]))

  • Author
  • Registered
  • March 31, 2016
OK that works but now when I press the button quickbase pops up a window  asking if I want to save the record "You've made changes to the (table record name".  Do you want to save these changes before going to the next screen?"  I dont want to go to another screen.

Wait, something does not make sense.  That Button should show in View mode only.  The user clicks and edits the record and then saves the record normally and it should then redisplay on form ID #10.

  • Author
  • Registered
  • March 31, 2016
ok that works but now its in view mode again so they have to press the button again after every save.  Can I code the button to stay in edit mode and just update the record?

I am not understanding where you want to return the user to after saving.  Do you want to leave them in Edit mode after saving?  if so, then in that last line of code, change the "dr" (Display Record) to "er" (Edit Record).

I am having a similar issue. The problem we are having is that Quickbase is not saving the most current excel report and when we review the report 1-2 employees' data is missing. I would like a solution to make sure not only is it saving each time but that it's saving the most current version, and replacing it automatically. Please help! Will adding a URL help? Each month they just need enter their updates, perhaps adjusting to an "edit only url" will help? If so how do I do this? TIA

Please post a new question as its very difficult to understand what you have posted.  I don't understand what you mean by not saving the current excel report.

Forum|alt.badge.img+6
Mark, re: the code you supplied above:
URLRoot() & "db/" & Dbid() &  "?a=er&dfid=10&rid=" & ToText([Record ID#]) 

& "&nexturl=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&dfid=10&rid=" & ToText([Record ID#]))

How would I do this in a rich text field? Can this be consolidated in a Var text URL structure?

Probably.

var text URL = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" & ToText([Record ID#])

& "&nexturl=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&dfid=10&rid=" & ToText([Record ID#]));

var text Words = "Click here";

"" & $Words & "

Forum|alt.badge.img+6
I'm trying to add this to a row of navigation buttons I've created using a rich text formula field. The problem is that the native Save button goes back to a different form.  



Here's the code:

var text bgcolor = "#4b72b0";
var text txtcolor = "white";
var text URLONE = URLRoot() & "db/" & Dbid() & "?a=er&dfid=31&rid=" & ;
var text URLTWO = URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=" & URLEncode("Service Request Form.html") & "&clist=a&rid=" & ;
var text URLTHREE = "https://vcommerce.quickbase.com/db/bnhjmd73w?";
var text style = "style=\"text-decoration: none; background:" & $bgcolor & "; border-radius: 5px; padding: 5px 10px; width: 25%; font-weight: normal; text-align: center; color: " & $txtcolor & "; font: normal 700 24px/1 \"Calibri\", sans-serif; text-align: center; text-shadow: none;";
// End button style


"<div>" &
"<a " & $style & " href='" & $URLONE &"'>Update Info</a>" & "&nbsp;&nbsp;" &
"<a " & $style & " href='" & $URLTWO &"' target=\"new\">Print Record</a>" & "&nbsp;&nbsp;" &
"<a " & $style & " href='" & $URLTHREE &"'>Dealer Service Home</a>" & "&nbsp;&nbsp;" &
"<a " & $style & " onclick='DoSaveAdd()'href='#'>Save Record</a>" & "</div>

See if this idea works

var text Edit = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10";

var text ViewOnFormTen = URLRoot() & "db/" & Dbid() & "?a=dr&dfid=10&rid=" & [Record ID#];

var text URL = 
$Edit
& "&NextURL=" & URLEncode($ViewOnFormTen);

var text Words = "click here";

"<a href=" & $URL & ">" & $Words & "</a>

Forum|alt.badge.img+6
That opened a fresh form. I don't need it to edit. The 'Update' button puts the form in edit mode. I just need it to save and display the correct form. Isn't there a way to amend the onclick='DoSaveAdd() so that it displays the current form upon save?

Sorry the first line was supposed to read

var text Edit = URLRoot() & "db/" & Dbid() & "?a=er&dfid=10&rid=" & [Record ID#];

Forum|alt.badge.img+6
But that's still an 'edit record' command. I'm not looking for the button to edit the record. I just want it to save it. The form is already in edit mode and has been edited. I just want to click a button that saves like 'onclick='DoSaveAdd() ', but I need it to stay on the same form. 

Forum|alt.badge.img+6
Or are you thinking I should edit the 'update' button?

I'm suggesting that they use the edit button and then the regular save button will stay on the proper form.  I don't know how to change the DoSaveAdd button to force a particular form, so I'm offering up an alternative solution.

yes, this would replace your update button.

Forum|alt.badge.img+6
Good call as usual, Mark... that worked!

Thx for letting me know it worked.  I guess that you are still "stuck" with the native edit button at the top right, but that native Edit is pretty subtle compared to your row of matching buttons which look more inviting to click. 

Forum|alt.badge.img+6
Not entirely... I have reinstated the DoSaveAdd and retained my save button, and it works just as the native button does :) Win, win!