Forum Discussion
ChayceDuncan2
6 years agoQrew Cadet
URL Buttons can be a little tricky because Quick Base is re-directing the page and it injects its own save prompt when things have changed.
That said - you can set up a new button that 'clicks' the save button for them using a rich-text formula that will work the same way from above with a little modification.
So if your url-button does this now:
Make a new Formula Rich Text and copy this:
This will make your editRecord call then save the page. I'd recommend if you go this route that you actually have 2 buttons - one for when they are on the 'View' versus 'Editing'. The reason is that when they're viewing this record, there is no save button to click - so its better to use Mark's version for 'viewing' so that the page still reloads
Chayce Duncan | Director of Strategic Solutions
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
That said - you can set up a new button that 'clicks' the save button for them using a rich-text formula that will work the same way from above with a little modification.
So if your url-button does this now:
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=cpaz2k7njc4ifc24muhvc749ast&rid=" & [Record ID#]
& "&_fid_58=1";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
Make a new Formula Rich Text and copy this:
var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&apptoken=cpaz2k7njc4ifc24muhvc749ast&rid=" & [Record ID#]
& "&_fid_58=1";
"<a class='Vibrant' href='#' onclick='" &
"javascript: {" &
"$.get(\"" &
$URL &
"\");" &
"$(\"#saveButton\").click();" &
"}'" & ">CLICK HERE</a>"
This will make your editRecord call then save the page. I'd recommend if you go this route that you actually have 2 buttons - one for when they are on the 'View' versus 'Editing'. The reason is that when they're viewing this record, there is no save button to click - so its better to use Mark's version for 'viewing' so that the page still reloads
Chayce Duncan | Director of Strategic Solutions
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
SarahClark
6 years agoQrew Cadet
The user would still need to do something proactive to indicate "I'm done" - whether it's checking a box manually or clicking a button.
The simplest solution would be to have them check the box manually when they are done and then Save and Close one last time. But for various reasons, a button is better for my users.
The simplest solution would be to have them check the box manually when they are done and then Save and Close one last time. But for various reasons, a button is better for my users.