Forum Discussion
MarkShnier__You
Qrew Legend
3 years agoIt's not a dumb question and it's actually a bit tricky.
There is relatively new functionality which will only work in a Rich Text formula field (not a Formula URL field type). It uses a special parameter called %%rid%% and that in combination with the SavedBeforeNavigating Will cause the record to first save and it allows the formula to grab the value of the newly established Record ID, and then continue with the rest of the URL.
Another tricky part is that the %%rid%% does not like getting URLEncoded.
Note that this will only work if the record is "dirtied" by the user - ie they have done some data entry and the Advanced Properties for the table is set to Auto save when navigating away.
var text RID = If([Record ID#]>0, ToText([Record ID#]), "%%rid%%");
var text SetCheckbox = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & $RID
& "&_fid_40=1";
var text DisplayRecordNoRID = URLRoot() & "db/" & Dbid() & "?a=dr&rid=";
var text URL =
$SetCheckbox
& "&rdr=" & URLEncode($DisplayRecordNoRID) & $RID;
"<a class='SaveBeforeNavigating' data-replaceRid=true style=\"text-decoration:none; background: #117a39; border-radius: 5px; color: #FFFFFF; display: inline-block; padding: 4px 4px 4px 4px; width:140px; text-align: center; text-shadow: none; border: 2px solid #0863f5; font-size: 12px \"href='"
& $URL
& "'>Submit</a>"
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------
Related Content
- 12 months ago
- 2 years ago
- 2 years ago
- 8 months ago