Forum Discussion

WilliamMarrone's avatar
WilliamMarrone
Qrew Cadet
6 years ago

Sending Variables with HTML

The title is not quite accurate. I am trying to use the RID and other informatation from a record in an HTML page off a Formula URL button on the same record form. 

var number RID = [Record ID#];
var date PolEffDate = [Pol Eff Date];
var text DOT = [DOT Number];

"https://user.quickbase.com/db/DBID?a=dbpage&pagename=InvoicePDF.html?rid="&[Record ID#]

I obviously know that HTML cannot handle these variables. Is there anyway to get access to the RID from a button click into an HTML page? I will be using JS and Jquery once I have access to the RID. I am only trying to do this so I can have a custom HTML page that will then run the code. Any help is appreciated!

4 Replies

  • Within the code page use this script 
    var urlParams = new URLSearchParams(window.location.search);
    urlParams.get("a"); // "dbpage"
    urlParams.get("pagename"); // "InvoicePDF.html"
    urlParams.get("rid"); // value of [Record ID#]
    You used to have to use a library to parse the query string but now we have URLSearchParams native in JavaScript.
  • The issue I have when using the above url is that it will link to a page that doesn't exist. It will take the RID and use it as a part of the redirect and so it will not link properly.