QuickBaseJunkie
Qrew Legend
4 years agoRe: Refresh Current Page After Save & Keep Working
The rdr is only used when you have multiple actions happening. Here you just need to save while staying on the page. Also the %%rid%% can't be URL Encoded to function properly, but since you're not redirecting to a second function, you don't need it.
The ?a=doredirect&z=" & Rurl() is something else entirely. It takes the user back to where they originally pressed the button (like a parent record or a report.
Below is all you really need. Just make sure you also have the box in the table's advanced settings to "Auto save when redirected away from the page".
One other thing to keep in mind is that for the record to save an actual edit to a field must be present. If someone just clicks the button without editing anything it won't save.
------------------------------
Sharon Faust (QuickBaseJunkie.com)
Founder, Quick Base Junkie
https://quickbasejunkie.com
------------------------------
The ?a=doredirect&z=" & Rurl() is something else entirely. It takes the user back to where they originally pressed the button (like a parent record or a report.
Below is all you really need. Just make sure you also have the box in the table's advanced settings to "Auto save when redirected away from the page".
var text rid =
If([Record ID#]>0,
ToText([Record ID#]),
"%%rid%%")
;
var text url = URLRoot() & "db/" & Dbid() & "?a=er&rid=" & $rid;
"<a class='Vibrant Primary SaveBeforeNavigating' data-replaceRid=true href='" & $url & "'>Save & Keep Working - Rich Text</a>"
One other thing to keep in mind is that for the record to save an actual edit to a field must be present. If someone just clicks the button without editing anything it won't save.
------------------------------
Sharon Faust (QuickBaseJunkie.com)
Founder, Quick Base Junkie
https://quickbasejunkie.com
------------------------------