Forum Discussion
MarkShnier__You
4 years agoQrew Legend
In general, the generic syntax to string multiple URLs together upon a button click is this
$URLONE
& "&rdr=" & URLEncode($URLTWO)
& URLEncode("&rdr=" & URLEncode($URLTHREE))
& URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))
& URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLFIVE))))
& URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSIX)))))
In your case we want to do two steps.
$URLONE
& "&rdr=" & URLEncode($URLTWO)
So we define the formula variables.
var text COPY = URLRoot() &"db/" & [_DBID_PROjects]& "?a=API_CopyMasterDetail&destrid="&[Record ID#]&"&sourcerid=13";
var text Display = URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];
$COPY
& URLEncode($Display)
~~~~~~~~~~~~~~~~~~
I like to use formula variables in my formula for readability and ease of debugging
https://help.quickbase.com/user-assistance/formula_variables.html
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
$URLONE
& "&rdr=" & URLEncode($URLTWO)
& URLEncode("&rdr=" & URLEncode($URLTHREE))
& URLEncode(URLEncode("&rdr=" & URLEncode($URLFOUR)))
& URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLFIVE))))
& URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSIX)))))
In your case we want to do two steps.
$URLONE
& "&rdr=" & URLEncode($URLTWO)
So we define the formula variables.
var text COPY = URLRoot() &"db/" & [_DBID_PROjects]& "?a=API_CopyMasterDetail&destrid="&[Record ID#]&"&sourcerid=13";
var text Display = URLRoot() & "db/" & dbid() & "?a=dr&rid=" & [Record ID#];
$COPY
& URLEncode($Display)
~~~~~~~~~~~~~~~~~~
I like to use formula variables in my formula for readability and ease of debugging
https://help.quickbase.com/user-assistance/formula_variables.html
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------
- Jan-WillemSpeck4 years agoQrew Assistant CaptainThanks Mark.
:-( I feel like there is a candid camera in my office :-(
Entered the code :
Below how the button looks like on the form (seems code is correct in this context)
pressing the button
same error again
pressing BACK button in browser --> child records copied
URL of the 'error page'
https://*****.quickbase.com/db/*****?a=API_CopyMasterDetail&destrid=16&sourcerid=13https%3A%2F%2F*****.quickbase.com%2Fdb%2F*****%3Fa%3Ddr%26rid%3D16
------------------------------
Jan-Willem Speckmann
------------------------------- Jan-WillemSpeck4 years agoQrew Assistant Captain
------------------------------- MarkShnier__You4 years agoQrew Legendsorry,
the last part should be
$COPY
& "&rdr=" & URLEncode($Display)
------------------------------
Mark Shnier (YQC)
mark.shnier@gmail.com
------------------------------