MichaelTamoush
5 years agoQrew Captain
Can't find my syntax error on formula url redirect
I'm trying to make a formula url button with a couple of Edit APIs and a redirect. One of my redirects does not work. Can someone spot the error?
var text MarkAdded =
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord"
& "&rid=" & [Record ID#]
& "&apptoken=xxxxxxxxxxxxxxxxxxxxxxx"
& "&_fid_12=0";
var text SetupComplete =
URLRoot() & "db/bqk7n95k3" & "?a=API_EditRecord"
& "&rid=" & [Related Project Set Up Form]
& "&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxxxx"
& "&_fid_157=Setup Complete";
var text Redirect = URLRoot() & "db/bqk7n95k3?a=dr&rid=" & [Related Project Set Up Form];
$MarkAdded &
If(ToText([Field to Compare])=ToText([Record ID#]),
"&rdr=" & URLEncode($SetupComplete) &
URLEncode("&NextURL=" & URLEncode($Redirect)), //This redirect does NOT work
"&rdr=" & URLEncode($Redirect)) //this redirect DOES work
------------------------------
Mike Tamoush
------------------------------
var text MarkAdded =
URLRoot() & "db/" & Dbid() & "?a=API_EditRecord"
& "&rid=" & [Record ID#]
& "&apptoken=xxxxxxxxxxxxxxxxxxxxxxx"
& "&_fid_12=0";
var text SetupComplete =
URLRoot() & "db/bqk7n95k3" & "?a=API_EditRecord"
& "&rid=" & [Related Project Set Up Form]
& "&apptoken=xxxxxxxxxxxxxxxxxxxxxxxxxxx"
& "&_fid_157=Setup Complete";
var text Redirect = URLRoot() & "db/bqk7n95k3?a=dr&rid=" & [Related Project Set Up Form];
$MarkAdded &
If(ToText([Field to Compare])=ToText([Record ID#]),
"&rdr=" & URLEncode($SetupComplete) &
URLEncode("&NextURL=" & URLEncode($Redirect)), //This redirect does NOT work
"&rdr=" & URLEncode($Redirect)) //this redirect DOES work
------------------------------
Mike Tamoush
------------------------------