Forum Discussion

Re: QID in Query String

Can you post your current URL formula ?

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

3 Replies

  • JoeMarchillo's avatar
    JoeMarchillo
    Qrew Trainee
    var text buttonText = "Get QID";
    //if I do this as an alert, the proper qid comes up
    var text myQid = "javascript:{ let params = (new URL(document.location)).searchParams; let qid = params.get('qid'); return qid;}";

    // set the checkbox and return to the report
    var text urlOne = URLRoot() & "db/" & Dbid()& "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_9=1" & "&apptoken=myapptoken";
    var text urlTwo = URLRoot() &"db/" & Dbid() &"?a=q&qid=" & $myQid;
    var text href = $urlOne & "&rdr=" & URLEncode($urlTwo);
    //I also tried to use the z=rurl() method and was unsuccessful

    "<div><a href='" & $href & "' class='btn btn-warning' style='font-weight:bold;text-decoration:none;color:white;'>\n&nbsp;&nbsp;"
    & $buttonText
    & "&nbsp;&nbsp;\n</a>\n</div>"

    ------------------------------
    Joe Marchillo
    ------------------------------
    • MarkShnier__You's avatar
      MarkShnier__You
      Icon for Qrew Legend rankQrew Legend
      If you just want to check a checkbox and refresh the page (ie any record or report that you are on) you can use this syntax as a URL formula

      var text URL  = URLRoot() & "db/" & Dbid()& "?act=API_EditRecord&rid=" & [Record ID#] & "&_fid_9=1" & "&apptoken=myapptoken";


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

      If you want it to be a Rich Text field you could adjust the Syntax for that.

      ------------------------------
      Mark Shnier (YQC)
      Quick Base Solution Provider
      Your Quick Base Coach
      http://QuickBaseCoach.com
      mark.shnier@gmail.com
      ------------------------------
      • JoeMarchillo's avatar
        JoeMarchillo
        Qrew Trainee
        I will give that a try, thank you!!!

        ------------------------------
        Joe Marchillo
        ------------------------------