Forum Discussion
JanaBaker
7 years agoQrew Cadet
This is SO great! I have some follow up questions thought! I successfully loaded all the iol stuff correctly the first try, so i am super proud of that! :)
Dan, in your Pastie, you have two variables defined.
Thank you both in advance!!
Dan, in your Pastie, you have two variables defined.
- var dbid = "bnq3c9658"; (<-- I am guessing this one is just the dbid before the ? of the table the data is coming from??)
- var dbidRecords = "bnq3damiq"; (<--where does this one come from??)
- This is my first additional thing to add to the "module.js". The code you have listed: https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=658, does that go in a Formula Field in a same Table as the variables above or do you just add a few carriage returns after the "Generic User Defined Page" stuff you so kindly provided us to get started and paste it there, meaning in "module.js"? _\_(_)_/__
Thank you both in advance!!
- _anomDiebolt_7 years agoQrew Elite1 & 2:
The naming convention I have adopted it to create a JavaScript variable dbid and assign it the dbid of the application and to create additional JavaScript variables (one for each table) with a prefix of dbid followed by a human readable name for the table (eg dbidClient).
3
You have to set up the IOL technique to use this code: Directions here:
https://haversineconsulting.quickbase.com/db/bgcwm2m4g?a=dr&rid=294 - CarlosCarlos7 years agoQrew Assistant CaptainJana,
As Dan commented, the only thing needed is to add the IOL field in the table being displayed, and the buttons should show.
Scriptwise, it's a copy/paste solution. - JanaBaker7 years agoQrew CadetThanks Carlos & Dan! Actually, I got the initial part of the IOL technique down, but missing the how to code the iframe of my grid edit report and where exactly to put this code:
(function(){
var querystring=document.location.search;
var dbid = "bnq3c9658";
var dbidRecords = "bnq3damiq";
var apptoken = "dbjtzhvncf9fjgbbpfmqxfwsv2wj";
$.ajaxSetup({data: {apptoken: apptoken}});
if (/dlta=mog/i.test(querystring) && /ifv/i.test(querystring)) {
var markup ='
<div class="RightColumn NoWrap PageNavBarActions" id="pageNavBarActions">
<a id="saveAction" href="#" class="Tall Vibrant Success" onclick="GeditDoSave(gReqDBID, true);">Save</a>
<a id="applyAction" href="#" class="Tall Vibrant Primary Secondary" onclick="GeditDoSave(gReqDBID);">Apply Changes</a>
<a id="cancelAction" class="cancelBtn Tall Vibrant FS-Button" onclick="GeditDoCancel();">Cancel</a>
</div>
';
$(markup).insertBefore("#bodyTable");
}
if (/a=td/i.test(querystring)) {
$("#facetKeyword").hide();
$('<input type="text" id="facetKeyword2" maxlength="255" class="FacetKeyword UserInput" placeholder="Search these records">').insertAfter("#facetKeyword")
$("#facetKeyword2").on("keyup", function(e) {
var keyCode = e.keyCode || e.which;
if (keyCode == 13) {
$("#facetKeyword").val($("#facetKeyword2").val()).trigger("keyup");
}
});
}
})();
Here are my follow up questions.- Does the above code go into an independent module.js with a new name or actually IN the original module.js created with the instructions provided....OR does it go in a field?
- My Grid Edit report is: https://mycompany.quickbase.com/db/bnjxiqkg3?a=q&qid=8. I know i have a Rich Text Formula to put the code in, but what do i wrap this with to make the iframe work? Like i said, this is my first one, so with a little guidance, i'll be off to the races after this weee bit of hand holding. :)
- CarlosCarlos7 years agoQrew Assistant Captaincreate a button that opens the new report in an iframe...
"javascript:void(window.open('" & URLRoot() & "db/" & [_DBID_TABLENAME] & "?a=q" & [Token] &"&qid=15&query={%2239%22.IR.%22this+mon%22}&dlta=mog~&ifv=1','PopUp').focus());"