Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am developing a mashup project.
I want to set value to qheight in CreateList method dynamically. But I don't know how to set value qheight. Do you have information about this topic ?
app.createList({
"qFrequencyMode": "V",
"qDef": {
"qFieldDefs": [
"Personel Sicil Ad Soyad"
]
},
"qExpressions": [],
"qInitialDataFetch": [
{
"qHeight":1,
"qWidth": 10000 // it must be dynamically
}
],
"qLibraryId": null
},SearchCV);
It's probably best not to use the pageHeight variable for looping through the response data. This is because you may have requested 500 rows for example, but only received 200. Also, the page object returned in the promise is also an array so, assuming you've only requested a single page, I would do this instead -
for (var i = 0; i <page[0].qMatrix.length; i++) {
data.push(page[0].qMatrix.length[0].qText);
}
This also assumes that you have an array variable called data that is available in the current scope.
try 0
I tried it but i didn't get data
You could omit the qInitialDataFetch property and use the getListObjectData function to fetch the data after the object has been instantiated, like this -
app.createList({ "qFrequencyMode": "V", "qDef": { "qFieldDefs": [ "Personel Sicil Ad Soyad" ] }, "qExpressions": [], "qLibraryId": null }).then(function(response){ var pageWidth = response.layout.qListObject.qSize.qcx; var pageHeight = Math.floor(10000, pageWidth); return response.enigmaModel.getListObjectData("/qListObjectDef", [{qTop: 0, qLeft:0, qHeight: pageHeight, qWidth: pageWidth}]) }).then(function(page){ //page should have data according to the above page request });
Hello Nick
How to write code below function. Is it true below ?
....
}).then(function(page){
//page should have data according to the above page request
for (var i = 0; i < pageHeight; i++) {
data.push(page.qMatrix[0].qText);
}
});
It's probably best not to use the pageHeight variable for looping through the response data. This is because you may have requested 500 rows for example, but only received 200. Also, the page object returned in the promise is also an array so, assuming you've only requested a single page, I would do this instead -
for (var i = 0; i <page[0].qMatrix.length; i++) {
data.push(page[0].qMatrix.length[0].qText);
}
This also assumes that you have an array variable called data that is available in the current scope.
Thanks a lot