Skip to main content
Question

Pulling a field value into a code page

  • April 7, 2019
  • 0 replies
  • 97 views

I'm needing to have a page open that will show some static text and a records [Client Name] dynamically.  The text is always the same, but the client name needs to be from the record where the button is clicked.  

I've tried to come up with a solution using the IOL technique, which I understand how IOL works, but I'm not so hot with Java Script.  What I thought would work is Dan D's Packing Slip Pastie, but scaled down, but it just wasn't happening. I thought I had it all correct, but the button wouldn't do anything.  I've been researching this, but my lack of Java just gets in the way.

Any help would be greatly appreciated.

Thanks,

Dana
This topic has been closed for replies.

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