Skip to main content
Question

XML view after button press

  • Oct 30, 2019 1:24 PM UTC
  • 1 reply
  • 21 views

Forum|alt.badge.img+11
The following code is generating a view of the XML results in lieu of the actual redirect.  What did I screw up here lol

//Trigger Automation to Import Estimating Tasks
var text UrlImportEstimating = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Project Number] &
"&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8" &
"&_fid_173=true" &
"&_fid_94=" & URLEncode("The estimating tasks have been imported from the template.") &
"&rdr=" & URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Project Number];

var text ButtonImportEstimating="<a class='" & [EliteButtonClass] & $STYLE & "href='" & $UrlImportEstimating & "'" & ">Import Estimating Tasks</a>";
//----------------------------------------------------------------------------------------

------------------------------
Ivan Weiss
------------------------------
This topic has been closed for replies.

1 reply

MarkShnierYou
Forum|alt.badge.img+24
Ivan,
The generral syntax for successive URL calls 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)))))
& URLEncode(URLEncode(URLEncode(URLEncode(URLEncode("&rdr=" & URLEncode($URLSEVEN))))))

So the issue with your formula is that you need to URLEncode after the  redirect 

& "&rdr=" & URLEncode($URLTWO)

My practise is to put the different URLs into formula variables and then I can just reuse the same syntax.

BUt to fix your code owuld be

//Trigger Automation to Import Estimating Tasks
var text UrlImportEstimating = URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Project Number] &
"&apptoken=c5gchf9bhwx6umbd2ii5zdqtb5x8" &
"&_fid_173=true" &
"&_fid_94=" & URLEncode("The estimating tasks have been imported from the template.") &
"&rdr=" & URLEncode(URLRoot() & "db/" & Dbid() & "?a=dr&rid=" & [Project Number]);

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
http://QuickBaseCoach.com
markshnier2@gmail.com
------------------------------