Quantcast
Viewing all articles
Browse latest Browse all 8068

Help on ACS retrieving multiple custom object query data

Hello, is there any way that I can have multiple custom object in a window (is it correct like the example) and also retrieving the data outsideof the query bracket ? It is an android application For example,

Cloud.Objects.query({
    classname: 'cars',
    page: 1,
    per_page: 10,
    where: {
        color: 'blue'
    }
}, function (e) {
    if (e.success) {
Cloud.Objects.query({
    classname: 'materials',
    page: 1,
    per_page: 10,
    where: {
        metal: 'titanium'
    }
},function (a){
  for (var i = 0; i < e.materials.length; i++) {
            var material = e.materials[i];
var materialparts = material.parts;
        }
}
}else{
var materialparts = 'Nothing';
}
}
alert(materialparts);
Is it possible to retrieve outside the query data? I found some trouble as material parts is undefined when I take it outside of the query function. Thank a lot.

Viewing all articles
Browse latest Browse all 8068

Trending Articles