Forum Discussion
ChayceDuncan2
7 years agoQrew Cadet
Is this page setup as a Quick Base code page? Or do is it like a document / text file that you're opening up?
If you're familiar with Code pages - you can just throw all your text into an HTML <body></body> -
since it will never change - and then using a little bit of jQuery and a URL parameter to throw your custom name in there.
Your button would look something like:
https://yourrealm.quickbase.com/db/mainappdbid?a=dbpage&pageid=20&customer=Customer Name
You would swap your inputs for your actual realm and the actual id of the page you create - and then Customer Name would be dynamic based on your formula-url in a record
Then your code page might be something like:
//START OF CODE PAGE
<body>
<div id="customer"></div>
<div id="staticText">Your actual static text would go in here</div>
//The below link brings in jQuery for you
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>;
<script>
//This will take the input you put in your URL for 'customer' from above using jQuery
$('#customer').text(window.location.search.split('customer=')[1]);
</script>
</body>
//END OF CODE PAGE
Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
If you're familiar with Code pages - you can just throw all your text into an HTML <body></body> -
since it will never change - and then using a little bit of jQuery and a URL parameter to throw your custom name in there.
Your button would look something like:
https://yourrealm.quickbase.com/db/mainappdbid?a=dbpage&pageid=20&customer=Customer Name
You would swap your inputs for your actual realm and the actual id of the page you create - and then Customer Name would be dynamic based on your formula-url in a record
Then your code page might be something like:
//START OF CODE PAGE
<body>
<div id="customer"></div>
<div id="staticText">Your actual static text would go in here</div>
//The below link brings in jQuery for you
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>;
<script>
//This will take the input you put in your URL for 'customer' from above using jQuery
$('#customer').text(window.location.search.split('customer=')[1]);
</script>
</body>
//END OF CODE PAGE
Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
ChayceDuncan2
7 years agoQrew Cadet
You can just toss a simple .replace to swap out the encoding - %20
In the same jQuery line - add .replace(/%20/g,' ') to replace %20 with a space to put it how you expect.
$('#customer').text(window.location.search.split('customer=')[1].replace(/%20/g,' '));
Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base
In the same jQuery line - add .replace(/%20/g,' ') to replace %20 with a space to put it how you expect.
$('#customer').text(window.location.search.split('customer=')[1].replace(/%20/g,' '));
Chayce Duncan | Technical Lead
(720) 739-1406 | chayceduncan@quandarycg.com
Quandary Knowledge Base