Forum Discussion
QuickBaseJunkie
Qrew Captain
Both my and Mark's (QB Coach) suggestions work in the Formula URL field.
Here is the formula I suggested more explicitly written out using your inital formula as a base:
var text URL = "javascript:void(DoSaveAdd())";
var text URLTWO = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageID=3";
var Text Image = "<a id='saveButton' class='Vibrant Success' onclick='DoSaveAdd()' href='#'>Submit</a>";
"<b href =" & $URL & "&rdr=" & $URLTWO &">" & $Image & "</b>"
(where the pageID=3 is replaced with your pageID).
-Sharon
Here is the formula I suggested more explicitly written out using your inital formula as a base:
var text URL = "javascript:void(DoSaveAdd())";
var text URLTWO = URLRoot() & "db/" & Dbid() & "?a=dbpage&pageID=3";
var Text Image = "<a id='saveButton' class='Vibrant Success' onclick='DoSaveAdd()' href='#'>Submit</a>";
"<b href =" & $URL & "&rdr=" & $URLTWO &">" & $Image & "</b>"
(where the pageID=3 is replaced with your pageID).
-Sharon
BrittanyScheid
3 years agoQrew Cadet
Never mind! I found another post that explained how to create a formula-rich text field that acts as the "Save & Keep Working". I just updated the URL to include the form ID to get what I needed. Here's the post for anyone else who's interested.
https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=d959cde4-8af7-4499-b793-c3f8807c57cd&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer
------------------------------
Brittany Scheid
Special Projects Manager
SimiTree
------------------------------
https://community.quickbase.com/communities/community-home/digestviewer/viewthread?MessageKey=d959cde4-8af7-4499-b793-c3f8807c57cd&CommunityKey=d860b0f8-6a48-487b-b346-44c47a19a804&tab=digestviewer
------------------------------
Brittany Scheid
Special Projects Manager
SimiTree
------------------------------
- QuickBaseJunkie3 years agoQrew Captain@Brittany Scheid I'm glad you found a solution.
I also have a video that covers the "SaveBeforeNavigating" class (about halfway through the video below) that might be helpful to you or others. AND if you want to learn even more about building buttons in Quickbase I'd recommend The Button Masterclass.
------------------------------
Quick Base Junkie
Quick Base Junkie
https://quickbasejunkie.com
------------------------------- BrittanyScheid3 years agoQrew CadetThat is helpful, thanks! Is there a way to have the action pause in between when the record saves and the next page displays? I have a pipeline that runs when the record is saved, and I want that to be finished before displaying the next page. I tried looking at the examples on Code Pages App, but the examples are either Prompt & Redirect, or Run, Pause & Refresh. I would need something like Save, Pause & Redirect. I don't know javascript really at all to be able to figure out what needs to be changed.
------------------------------
Brittany Scheid
Special Projects Manager
SimiTree
------------------------------- QuickBaseJunkie3 years agoQrew Captain@Brittany Scheid, you should be able to use the Run, Pause, & Redirect.
Only in place of an API call for the 'run', navigate to say the home page (anything away from the page you're on).
So taking the formula from the app you mentioned...
/ Creating a toggle for the Checkbox
var text toggle = If([Checkbox 2], "false", "true");
// API URL to Add/Edit/etc.
var text urlToExecute =URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&apptoken=" & [App Token]
& "&rid=" & [Record ID#] & "&_fid_20=" & $toggle;
URLRoot() & "db/" & AppID() & "?a=dbpage&pageid=6" // Open code page 6
& "&url=" & URLEncode($urlToExecute) // Pass in the URL to execute
Change the urlToExecute variable toURLRoot() & "db/" & AppID()
-Sharon
------------------------------
Quick Base Junkie
Quick Base Junkie
https://quickbasejunkie.com
------------------------------