Forum Discussion

MichaelTamoush's avatar
MichaelTamoush
Qrew Captain
4 years ago

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
------------------------------

1 Reply



  • $MarkAdded &
        If(ToText([Field to Compare])=ToText([Record ID#]),
           "&rdr=" & URLEncode($SetupComplete) &
            URLEncode("&rdr=" & URLEncode($Redirect)), //This redirect does NOT work
        "&rdr=" & URLEncode($Redirect)) //this redirect DOES work



    the other issue I see is that this line should read like this because the words have a space in the phrase. 


    & "&_fid_157=" & URLEncode("Setup Complete");


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