Forum Discussion
Well, Save and Keep working is essentially save and display the record in edit mode. I think that this can be done with a Rich Text formula field.
var text RID = IF([Record ID#]>0, [Record ID#], "%%rid%%"); // %%rid%% will grab the Record ID of the newly saved record.
var text URL = URLRoot() & "db/" & dbid() & "?a=er&rid=" & $RID;
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #4b7097; border-radius: 5px; color: #ffffff; display: inline-block; padding: 5px 5px 5px 5px; width:100px; text-align: center; text-shadow: none; border: 2px solid #030404; font-size: 12px \"href='"
& $URL
& "'>Save and Display in Edit Mode</a>"
// you will probably have to play around with the formatting of the button to get it to look nice.
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Brilliant! Thanks, Mark.
I did need to tweak it a bit. I changed var text RID to var number RID and removed the %%rid%%. And of course, I did some formatting changes. But it works perfectly!
------------------------------
Barry Dolan
------------------------------
- MikeTamoush2 years agoQrew Commander
The %%rid%% is used for a new record, in add record mode. If you remove that portion, this button will only work after it has been saved the first time, and the record ID exists.
I've tried Marks code before (with the %%rid%%) and it has worked great for me. I recommend keeping that part in, and posting back the error you are getting (if you are getting one).
------------------------------
Mike Tamoush
------------------------------- BarryDolan2 years agoQrew Cadet
OK, good advice.
Here's the error.
I changed the var from text to number but get the same error.
------------------------------
Barry Dolan
------------------------------- MikeTamoush2 years agoQrew Commander
Keep it as a text variable. Mark just forgot to Make his Record ID text. Variable should look like this:
var text RID = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
------------------------------
Mike Tamoush
------------------------------