Cannot load more than 10 records

Hello, I am using the following code to extract data from the tables, it only retrieves 10 records. Please help

array = new ArrayList<>();

queryBuilder = DataQueryBuilder.create();

CustomProgressDialog(“Loading…please wait”);

Backendless.Persistence.of(ObservedIKIndicators.class).find(queryBuilder, new AsyncCallback<List<ObservedIKIndicators>>() {
@Override
public void handleResponse(List<ObservedIKIndicators> response) {
for (int i = 0; i <response.size() ; i++)
{
if (response.get(i).getUser().equals(userEmail))
{

array.add(response.get(i));
// array.add(new ObservedIKIndicators(response.get(i).getUser(),
// response.get(i).getIndicatorName(),response.get(i).getImageUrl(),
// response.get(i).getLocation(),response.get(i).getStatus(),response.get(i).getCreated()));
}

}
adapter = new History_Adapter(getApplicationContext(), array);

lvHistory.setAdapter(adapter);

Global_Class.ShowToast(getApplicationContext(),“Download successful”);
progressDialog.dismiss();
}

@Override
public void handleFault(BackendlessFault fault) {

Global_Class.ShowToast(getApplicationContext(),"Error: "+ fault.getMessage());
progressDialog.dismiss();
}
});

Hello @Jason_Brown1

Maybe this topic - How to optimize a Find query for a Hierarchy of objects to get all of the objects instead of just 10 - help you.

Hi, I’m not sure what you are telling me to do in the thread you linked.

Hi Jonas
I guess you are looking for “setPageSize” method and here it is https://backendless.com/docs/android/data_data_paging.html
Regards, Vlad

1 Like

Dear Vlad,

I would like to thank you kindly for your quick response, this was indeed the information I needed.

Kind regards,

Jason