Forum Discussion
_anomDiebolt_
7 years agoQrew Elite
>But how do I change the gReqAppDBID to point it to a specific table in my app.
Don't change your formula - you need to change the content of the script in the code page myscript.js. It is a little know fact that you can use any dbid in an application to address a code page URL. For example, all of these URLs in the application QuickBase Support Center point to the same code page:
https://login.quickbase.com/db/6ewwzuuj?a=dbpage&pageid=6
https://login.quickbase.com/db/9kaw8phg?a=dbpage&pageid=6
https://login.quickbase.com/db/6ewwzuuj?a=dbpage&pageid=6
So what you need to do is use the appropriate dbid in your code page script and leave your formula unchanged.
Don't change your formula - you need to change the content of the script in the code page myscript.js. It is a little know fact that you can use any dbid in an application to address a code page URL. For example, all of these URLs in the application QuickBase Support Center point to the same code page:
https://login.quickbase.com/db/6ewwzuuj?a=dbpage&pageid=6
https://login.quickbase.com/db/9kaw8phg?a=dbpage&pageid=6
https://login.quickbase.com/db/6ewwzuuj?a=dbpage&pageid=6
So what you need to do is use the appropriate dbid in your code page script and leave your formula unchanged.
EOMDevelepors
7 years agoQrew Captain
Thanks for your reply. My understanding is that gReqAppDBID gets the table id of the current table. If I need to edit record on table "bnqepesti" how to I write that in the code page. I tried dbid: "bnqepesti" but its not working.
Thanks again for your help.
here is a copy of my current code page:
var apptoken = "cci99s..............tqtfq";
$.ajaxSetup({data: {apptoken: apptoken}});
var description= prompt("Enter a brief description of the work done in this session: ", "");
var dbidTable = "bnqepesti";
var promise = $.get(dbidTable, {
act: "API_EditRecord",
rid: QBU_rid,
_fid_20: description,
_fid 6: "Out"
});
$.when(promise).then(function(){
document.location.href = dbidTable + "?a=dr&rid=" + QBU_rid;
});
Thanks again for your help.
here is a copy of my current code page:
var apptoken = "cci99s..............tqtfq";
$.ajaxSetup({data: {apptoken: apptoken}});
var description= prompt("Enter a brief description of the work done in this session: ", "");
var dbidTable = "bnqepesti";
var promise = $.get(dbidTable, {
act: "API_EditRecord",
rid: QBU_rid,
_fid_20: description,
_fid 6: "Out"
});
$.when(promise).then(function(){
document.location.href = dbidTable + "?a=dr&rid=" + QBU_rid;
});