Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

How to Query more than 1000 ACS users together?

$
0
0

Hi, I have created an application which uses ACS. In the app I have a feature in which I need to list all the users who has created account using my application. I was using Cloud.Users.query method to get all users and now a days the users of my app has crossed 1000. So I get only 1000 users in a call. (I know the limit is 1000).

My code is as follows

function _getAllUsers(currentUser, callback){
    if(!currentUser){
        currentUser = _getCurrentUser();
    }
    var query = {
                    where: { "admin" : false, "id": {"$ne": currentUser.id} },
                    limit : 1000,
                    order : 'first_name'
                };
    Cloud.Users.query(query, function (e) {
              if (e.success) {
                    callback.success(e.users);
              } else {
                    callback.error(e);
              }
    });
}
So now I want to query the remaning users. How can I get the count of total app users (I saw it is 1200 from ACS Server)?

How can I include them in the list?

Can anybody help me to do it, any help will be appreciated.


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>