I have a Rest API query to a list that now has more than 5000 items in it and I’m struggling with the code to retrieve the data I want, my code is below: -
// Function to retrieve Equipmment List from QPS and set in Equipment List Field
function updateEquipmentList () {
var equipmentList = '';
$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('Solutions%20Quotation%20Products')/Items?$select=Quantity,Product_x0020_Description$filter=(Solutions_x0020_Quotations_x0020/Title eq '"+quoteReference+"' and Show_x0020_on_x0020_Proposal eq 1)",
type: "GET",
cache: true,
async: false,
headers: {
"accept": "application/json;odata=verbose",
},
success: function(data) {
for (var i = 0; i < data.d.results.length; i++) {
var item = data.d.results[i];
equipmentList += (item.Quantity+' x '+item.Product_x0020_Description+'; ');
fd.field('Equipment_x0020_List').value = equipmentList;
}
},
error: function(error) {
alert(error.responseText);
}
});
}
I would really appreciate a bit of help with the best way of dealing with the issue and retrieving the data I need.
Thanks