Nesting URL API Calls in one Button
- 2 months ago
Yep, been there, done it, bought the T-Shirt.
It's unpublished and I really struggled with that too, a decade or two ago.
Here is the generic syntax. Just slice off as must of the salami as you need, keeping in mind that the last URL call needs to land the user on a record or a report or a Dashboard page or just refresh the page, or else it will spew the last XML success message back at the user.
$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)))))
& URLEncode(URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSEVEN))))))If you copy paste to a Quickbase record or Word doc it won't wrap and it will be easier to see the pattern.
I have longer versions too. At some point the URL gets too long for some browsers to handle.
If you want to just refresh the page you are on, you can end with this step as $RefreshPage
var text RefreshPage = URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl();