@fabiobalsamo wrote:
Hi how put data from database in array?? i try to create an object and pass the array because after i need to loop to make multiple http request
var queryCF = "SELECT caseFolderId, caseTaskId FROM Tabella_OdL WHERE stepName='Approva/Rifiuta'";
$rootScope.allCFJSON = [];
$cordovaSQLite.execute(db, queryCF, []).then(function(res) {
if(res.rows.length > 0) {for(var i = 0; i < res.rows.length; i++) { var objectAllCF = { caseFolderId: res.rows.item[i].caseFolderId, caseTaskId: res.rows.item[i].caseTaskId }; console.log("ARRAY objectAllCF " +objectAllCF); $rootScope.allCFJSON.push(JSON.stringify(objectAllCF)); console.log("json arrayAllCF" + arrayAllCF);
for(var i = 0; i < $rootScope.allCFJSON.length;i++){
var authdata = Base64.encode("DEMVSINT_ADMIN" + ":" + "Password01");
$http.defaults.headers.common["Authorization"] = "Basic " + authdata;
var servizioDue = "http://demvsint-as1-sd.services.eni.intranet:8001/CaseManager/CASEREST/v1/case/" + objectAllCF.caseFolderId[i] + "?TargetObjectStore=CM_DCMSVS_TGT_OBJ";
$http.get(servizioDue).success(function(respo) {
console.log(respo);
Posts: 1
Participants: 1