Forum Discussion

SystemAdmin7's avatar
SystemAdmin7
Qrew Cadet
5 years ago
Solved

Adding If Statement to URL Formula

Hey all, I wanted to know if anybody knows how to add an if statement to a URL formula with javascript? Currently my formula looks like this: var text url=URLRoot() & "db/" & Dbid() & "?a=A...
  • MarkShnier__You's avatar
    5 years ago
    np
    var text url=URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&_fid_30=Sent&_fid_29=Sent&apptoken=XXXXX&rid=" & [Record ID#];

    If([Submitted for Payroll Log] != "Sent" and [Commission for Homeowner] != 0,

    "javascript:" &
    "$.get('" &
    $url &
    "',function(){" &
    "location.reload(true);" &
    "});"
    & "void(0);"

    ) //this is the closing bracket to the IF


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