Zoho Creator Javascript Loop via plus de 200 enregistrements
var recordOps = ZOHO.CREATOR.API;
var creatorSdkPromise = ZOHO.CREATOR.init();
var user = "";
var counter = 0;
creatorSdkPromise.then(function (data) {
getData("1");
});
async function getData(page_num) {
var reportLinkName = "Your_Report_Name";
var config = {reportName: reportLinkName, page : page_num, pageSize : "200"};
var getRecords = recordOps.getAllRecords(config);
getRecords.then(function(jsonData) {
$.each(jsonData.data, function(idx, value) {
// Parse your data here
counter += 1;
console.log(counter + ": " + value.ID);
});
var num_of_records = Object.keys(jsonData.data).length;
if(num_of_records == 200) {
getData(parseInt(page_num) + 1);
}
}).catch(err => console.log("No matching records"));
}
Meandering Meerkat