Getting Count of all scores in Leaderboard

0 votes
I have a leaderboard set up where I can get lists of scores, and I would like to show the total number of submitted scores for all players for this game. Is there any functionality for a method to get the Count of all records?
asked Oct 12, 2014 in App42 Cloud API-BaaS by thebattlebuddy (23 points)

1 Answer

0 votes
Best answer


You can use getScoreByUser method to get all the scores of user in that game. Please have a look on this link this method will return the array of scores which user has scored in the game. Also the size of an array is the count of all records which user has in the game.image


let us know if it helps.


Himanshu Sharma


answered Oct 13, 2014 by hs00105 (2,005 points)
selected Oct 16, 2014 by thebattlebuddy
This is a good method for getting a count on a single user. However, I would like to get a count of all user scores for a particular game.

For example, if there were 1,200 users who each had 2 scores submitted to a game, the Count for all scores would be 2,400.
There is no such method to find all the records of users in game and we don’t have any future plan for this. You can create a JSON at the time of save score and save it in separate collection. You can call findAllDocCount on this collection when you want to check the total record count. However we have recorded your request and put in a backlog. If we get more request on it, we will plan it for release and update you accordingly.

Himanshu Sharma
Well that sucks. I'll have to live with that for now. Until then, I'll use a work around.

I created a user account that has a very low score of -100 when scores can only be positive. If I query to get this account's rank, it will always be the highest number; which would be the total number of scores submitted by users.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on