As of April 12th, you must go to Progress SupportLink to create new support cases or to access existing cases. Please, bookmark the SupportLink URL and use the new portal to contact the support team.
I have a list of users and I'm trying to load them in a listview. First I'm Ioading 10 users and then the listview has onScrollListener where I load more. I've succeeded this part with:
q.setLimit(limit);
q.setSkip(skip);
But now I want to sort all the data (alphabetically) before it loads.
Yes, that's my query... I thought it was a problem with limit and skip but the limit is set to 10 and sort works for more than 20 records...after that it happens like in the eg. that I gave
E
Edward
said
almost 9 years ago
There might be another issue here. Can you take a look at our troubleshooting guide and enable debug logging, and then post the http request and response for the queries?
GET https://baas.kinvey.com/user/....../?limit=10&query=%7B%22company_id%22:%22543ffecb3d438d54220579e4%22,%22_id%22:%7B%22$nin%22:%5B%225461dbe2babca7c75a0033b0%22%5D%7D%7D&sort=%7B%22full_name%22%20:%201%7D
Is it possible that every entity doesn't have the `full_name` field populated?
Can you give us a sample subset of the some of the data with the full_name field so we can reproduce it?
Also-- that above request you posted does look correct, although it doesn't contain a `skip`.
s
stefAndroid
said
almost 9 years ago
All the fields in full_name are populated. The skip is missing because I am adding it on the second call. When I scroll over 10 entries I add q.skip(10) and the get users thread starts again. Edward is it possible to send you a subset of data on an email address?
r
raducanb
said
almost 9 years ago
I can confirm this happening on iOS. I had a simple request with skip and limit and after adding the modifier like this:
I get mix results. More exactly, for the first query I get entities that have full_name starting with "b" and "v" and only after that, from the second request onward, I get them ordered.
v
v3ga
said
almost 9 years ago
Indeed: sorting does not work with skip and limit on both Android and iOs apis.
stefAndroid
I have a list of users and I'm trying to load them in a listview. First I'm Ioading 10 users and then the listview has onScrollListener where I load more. I've succeeded this part with:
q.setLimit(limit);
q.setSkip(skip);
But now I want to sort all the data (alphabetically) before it loads.
I've tried with:
q.addSort("full_name", AbstractQuery.SortOrder.ASC);
Let's say we have the next list: a, b, a, c, b, a;
After adding the sort the result is: a, a, b, c, a, b;