Hi guys,
i wrote a REST query on a list with 1900 items in Sharepoint online. Than i put the result in an array and i use it in a atuocmplete fileld(jquery autocomplete). There is a problem: the query dont retunr all the items.. Suggstions?
Here is my code (i just tryed : items?top=2000 ,items? .... )
The query returns only 100 items
$(document).ready(function() {
var myDataD = [];
var requestHeadersD = {
"accept": "application/json;odata=verbose"
}
$.ajax({
url: "https://<my tenant>/Demo%20Intranet/Expenses%20tracker/_api/web/lists/GetByTitle('Destinations')/items?$filter=ID gt '1' and ID lt '4900'",
type: 'GET',
dataType: 'json',
async: false,
headers: requestHeadersD,
success: function (data) {
$.each(data.d.results, function (i, result) {
if(result.Title) {
myDataD.push(result.Title);
}
});
myDataSourceD(myDataD);
},
error: function ajaxError(response) {
alert(response.status + ' ' + response.statusText);
}
});
function myDataSourceD(myDataD){
$('#ctl00_ctl33_g_7f71344f_dfbf_4a46_aa90_6d57ab542e6f_ff31_ctl00_ctl00_TextField').autocomplete({
source: myDataD,
minLength: 2
});