Forum Academy Marketplace Showcase Pricing Features

Rank of an item in a list?

Hello,
I am designing a website in which users have a score that can change through time.
I would like to display on the user’s profile page it’s rank, when sorted using this score.
Is it possible to retrieve the index of an item in a sorted list ?

For instance, if I sort the Users by score, can I get the index of the current user inside this sorted list ?

Thanks !

Edit: I am sorry, I just thought of a solution just after posting…
In my case, I only need to do a search for Users that have a higher score, and count the number of items in that list.
The rank of the user is this number + 1

2 Likes