Forum Discussion
KenCasser
7 years agoQrew Cadet
Dan - I have succeeded with 'GetDBVar', but my limited knowledge is preventing me from translating that to 'SetDBVar'. Here's what I've got. Where am I going wrong?
function setDBVar(dbid, varDaName, 12) {
return Promise.resolve(
$.set(dbid, {
act: "API_SetDBVar",
varname: varDaName
})
).then(function(xml) {
return $("value", xml).text();
});
}
getDBVar(dbid, varDaName)
.then(function(varValue) {
console.log('${varDaName} = ${varValue}');
});
Thank you!
Ken
function setDBVar(dbid, varDaName, 12) {
return Promise.resolve(
$.set(dbid, {
act: "API_SetDBVar",
varname: varDaName
})
).then(function(xml) {
return $("value", xml).text();
});
}
getDBVar(dbid, varDaName)
.then(function(varValue) {
console.log('${varDaName} = ${varValue}');
});
Thank you!
Ken
KenCasser
7 years agoQrew Cadet
Thank you! I got it to work, and tried getting the 'Set' and a 'Get' to work in sequence and then nothing worked! I'll have to play with it more tomorrow, but thank you for your help.