Forum Discussion
CarlosCarlos
7 years agoQrew Assistant Captain
Hi,
I'd really appreciate some help.. Trying to implement Dan's solution but the value I'm getting from the Do_Query is always 0..
fid_109 is called f_montominimo, and it should be a numeric value. I?m trying to get it into a variable and display on an alert (to verify it) and I use it later on in the code for other calculations.
I'd really appreciate some help.. Trying to implement Dan's solution but the value I'm getting from the Do_Query is always 0..
fid_109 is called f_montominimo, and it should be a numeric value. I?m trying to get it into a variable and display on an alert (to verify it) and I use it later on in the code for other calculations.
var promise1 = $.get(gReqDBID, {
act: "API_DoQuery",
query: "{3.EX.QBU_key}",
clist: "3.109"
});
$.when(promise1).then(function(xml){
console.dirxml(xml);
var montominimo = $("f_montominimo", xml).text();
montomin = Number(montominimo);
console.log(montominimo);
});
- _anomDiebolt_7 years agoQrew EliteIt is better to ask a new question with your specific details.
The first thing I noticed is that you have QBU_key as a literal substing:query: "{3.EX.QBU_key}",
You should be string concatenation like so:query: "{3.EX." + QBU_key+ "}",
Or string interpolation:query: '{3.EX.${QBU_key}}',
But in any case you don't say where the variable QBU_key is coming from. - CarlosCarlos7 years agoQrew Assistant CaptainThe js code executes on a button click... But that first thing you noticed actually solved it! Thanks!
"javascript:" &
"var QBU_key = '" & [Record ID#] & "';" &
"$.getScript(gReqAppDBID + '?a=dbpage&pagename=ADDBID.js');" &
"void(0);"