Forum Discussion
JohnBarulich1
7 years agoQrew Cadet
Dan:
Thanks a bunch, this helped me a ton with how to start and what I need to learn. A few comments/questions about the syntax/logic. Feel free to let me know anything about my thought process here:
1. I understand we need to create an anonymous function for the .each() call so that we can loop through every record and retrieve its attributes
2. I understand what get() conceptually should do. The dbidTable needs to be referenced on every iteration of the each() loop
3. The .then() is a promise to be fulfilled if the get() call is successful. However, what value is stored into 'xml' from get() if it's successful. And WHY do we need to pass 'xml' to our selection along with record? Why are double quotes allowed, when the literature I have read for this requires single quotes?
4. Can you briefly explain the necessity for the 'this' keyword in the selection. I have used it plenty, but maybe there are subtleties I don't quite understand in this statement.
Thanks again, I have learned quite a bit so far.
Thanks a bunch, this helped me a ton with how to start and what I need to learn. A few comments/questions about the syntax/logic. Feel free to let me know anything about my thought process here:
1. I understand we need to create an anonymous function for the .each() call so that we can loop through every record and retrieve its attributes
2. I understand what get() conceptually should do. The dbidTable needs to be referenced on every iteration of the each() loop
3. The .then() is a promise to be fulfilled if the get() call is successful. However, what value is stored into 'xml' from get() if it's successful. And WHY do we need to pass 'xml' to our selection along with record? Why are double quotes allowed, when the literature I have read for this requires single quotes?
4. Can you briefly explain the necessity for the 'this' keyword in the selection. I have used it plenty, but maybe there are subtleties I don't quite understand in this statement.
Thanks again, I have learned quite a bit so far.
_anomDiebolt_
7 years agoQrew Elite
The tag name is derived from the field label by lower-casing every letter and substituting an underscore (eg "_") for every non-alphanumeric character.
Perhaps another way to see the tag names QuickBase uses in the response is to just console log the XML response:
Perhaps another way to see the tag names QuickBase uses in the response is to just console log the XML response:
(function(){})();
var dbid ="9kaw8phg";
var dbidTable = "6ewwzuuj";
var apptoken = "not required";
$.ajaxSetup({data: {apptoken: apptoken}});
$.get(dbidTable, {
act: "API_DoQuery",
query: "{6.EX.Type Conversion}",
clist: "3.7.8"
}).then(function(xml) {
console.dirxml(xml);
// more code here
});