Hello,
I've created a button that, when clicked, updates a date. I've used this button many times in a form, but I want to use it in a report and stay in the report once the date is updated. Here's my formula for redirecting back to the form:
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=xxxxxxxxxxxxxxxxxxxx" &
"&_fid_33=Now" &
"&rdr=" & URLEncode(URLRoot()&"db/" & Dbid() & "?a=dr&dfid=12&rid="&[Record ID#])
The above redirects me to the actual record. I would like to redirect back to the report (a=q&qid=19) but not quite sure how to do that. Any help with this would be appreciated.
Thank you,
Kim
------------------------------
Kim
------------------------------
Solved
Button to Update Date and stay in report
Best answer by MarkShnierYou
np,
This magic code on the rdr Redirect will refresh whatever page you are on, so for example a report, or a record or even if you click the button on an embedded child record on the form it would refresh that form because it simply refreshes the Page you were on.
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
So use it like this,
var text URL = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=xxxxxxxxxxxxxxxxxxxx" &
"&_fid_33=Now";
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
$URL
& "&rdr=" & URLEncode($RefreshPage)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
View originalThis magic code on the rdr Redirect will refresh whatever page you are on, so for example a report, or a record or even if you click the button on an embedded child record on the form it would refresh that form because it simply refreshes the Page you were on.
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
So use it like this,
var text URL = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &
"&rid=" & [Record ID#] &
"&apptoken=xxxxxxxxxxxxxxxxxxxx" &
"&_fid_33=Now";
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();
$URL
& "&rdr=" & URLEncode($RefreshPage)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
This topic has been closed for replies.
Sign up
Already have an account? Login
Login to the community
Login with Quickbase US – quickbase.com Login with Quickbase EU – quickbase.eu
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.