Forum Discussion
ChadBrandmire
6 years agoQrew Assistant Captain
I'm trying to get the rid of another table to populate into a field. I tried this with DoQueryCount to get numMatches and as it should returns "1" and puts it in fid 74. But, when i try the DoQuery below I get nothing.
What am I missing?
var dbid="myDBID";
var apptoken = "oooolooktokens";
var pro = kRid;$.ajaxSetup({async: false});
var ntit = $("#_fid_9").val();
var nupc = $("#_fid_75").val();
$.ajaxSetup({data: {apptoken: apptoken}});
var promise = $.get(dbid,{
act: "API_DoQuery",
query: "{'35'.CT."+ntit+"}AND{'34'.CT."+nupc+"}",
clist: "3"
});
$.when(promise).then(function(xml){
console.dirxml(xml);
var recordid = $("ItemID", xml).text();
console.log(recordid);
$("#_fid_74").val(recordid);
});
What am I missing?
var dbid="myDBID";
var apptoken = "oooolooktokens";
var pro = kRid;$.ajaxSetup({async: false});
var ntit = $("#_fid_9").val();
var nupc = $("#_fid_75").val();
$.ajaxSetup({data: {apptoken: apptoken}});
var promise = $.get(dbid,{
act: "API_DoQuery",
query: "{'35'.CT."+ntit+"}AND{'34'.CT."+nupc+"}",
clist: "3"
});
$.when(promise).then(function(xml){
console.dirxml(xml);
var recordid = $("ItemID", xml).text();
console.log(recordid);
$("#_fid_74").val(recordid);
});