I'm not sure what your formula reads as now because you didn't post your whole formula but the full corrected formula is this (other than you need to put in your own application token)
var text RID = If([Record ID#] > 0, ToText([Record ID#]), "%%rid%%");
// the %%rid%% is a special symbol which will be replaced by the value of the
// Record ID# when the SaveBeforeNavigating happens.
var text Edit = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & $RID & "&apptoken=you wish you knew&_fid_79=Pending Review";
var text DisplayURLMissingRID = URLRoot() & "db/" & Dbid() & "?a=dr&rid=";
var text URL = $Edit
& "&rdr=" & URLEncode($DisplayURLMissingRID) & $RID;
// note that the %%rid%% does not like being URLEncoded!
"<a class=\"Vibrant Primary SaveBeforeNavigating\" width:310px; text-align: center;\" href='" & $URL & "'>Submit</a>"
------------------------------
Mark Shnier (Your Quickbase Coach)
mark.shnier@gmail.com
------------------------------