# Rank of an item in a list?

**URL:** <https://forum.bubble.io/t/rank-of-an-item-in-a-list/11584>\
**Category:** Database\
**Created:** [March 20, 2017, 3:57pm UTC](https://forum.bubble.io/t/rank-of-an-item-in-a-list/11584 "2017-03-20T15:57:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![florent.bocquelet](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/florent.bocquelet/32/11409_2.png) [@florent.bocquelet](https://forum.bubble.io/u/florent.bocquelet)\
**Post date:** [March 20, 2017, 3:57pm UTC](https://forum.bubble.io/t/rank-of-an-item-in-a-list/11584/1 "2017-03-20T15:57:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joshcornelius9](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/joshcornelius9/32/83008_2.png) [@joshcornelius9](https://forum.bubble.io/u/joshcornelius9)\
**Post date:** [February 25, 2021, 3:50pm UTC](https://forum.bubble.io/t/rank-of-an-item-in-a-list/11584/2 "2021-02-25T15:50:10Z")

</div>

ahhh genius, solved my problem. Thanks for sharing the solution!

---

<div class="post-metadata">

**Author:** ![agilejelly](https://avatars.discourse-cdn.com/v4/letter/a/d9b06d/32.png) [@agilejelly](https://forum.bubble.io/u/agilejelly)\
**Post date:** [April 16, 2021, 1:02am UTC](https://forum.bubble.io/t/rank-of-an-item-in-a-list/11584/3 "2021-04-16T01:02:17Z")

</div>

Hi! Can you share specifically how you achieved this?

I have a list of things (hamburger recipes). Each thing has a name, and a _score_ from 1 - 100. 100 is the highest ranking _score_ and 1 is the lowest. **Scores change over time**.

When a user creates a new _score_ for a thing, I want to update and save the _rank_ number for each burger recipe in the database compared to all recipe’s _scores_.

Example:

Regular Burger | Score average: 90 | Rank: 1  
Spicy Burger | Score average: 85 | Rank: 2  
Veggie Burger | Score average: 80 | Rank: 3

**When users submit a new score, how do I with a workflow update the rank value in the database?**

Example:

User submits new score for Spicy Burger of 100. New Average Score = 92.5

Therefore Spicy Burger gets highest ranking:

Spicy Burger | Score average: 92.5 | Rank: 1  
Regular Burger | Score average: 90 | Rank: 2  
Veggie Burger | Score average: 80 | Rank: 3

How do I achieve this with a workflow?

---

<div class="post-metadata">

**Author:** ![geraldofurtadojr](https://avatars.discourse-cdn.com/v4/letter/g/e56c9b/32.png) [@geraldofurtadojr](https://forum.bubble.io/u/geraldofurtadojr)\
**Post date:** [August 1, 2022, 6:18pm UTC](https://forum.bubble.io/t/rank-of-an-item-in-a-list/11584/4 "2022-08-01T18:18:54Z")

</div>

In a repeting group create a input field with dynamic data.  
Do a Seach for Hamburger recipess (add new constraint; Score average \> current cell hamburger recipes’s Score average):count+1

---

<div class="post-metadata">

**Author:** ![mr.dj.mcintosh](https://avatars.discourse-cdn.com/v4/letter/m/cc9497/32.png) [@mr.dj.mcintosh](https://forum.bubble.io/u/mr.dj.mcintosh)\
**Post date:** [March 27, 2025, 5:08am UTC](https://forum.bubble.io/t/rank-of-an-item-in-a-list/11584/5 "2025-03-27T05:08:59Z")

</div>

Thanks a lot! This worked perfect on my app.
