Forum Academy Marketplace Showcase Pricing Features

How to display user rank on profile page?

So I have a user field called “XP” and it’s a number field. Basically as the user engages various ways on my site, their XP number goes higher and higher.

I know to make a leaderboard page ranking a user is as simple as creating an RG and sorting it by the “XP” value, but what if I want to display the users rank on their profile page?

I would imagine it’s as simple as running some type of equation/comparison where Bubble is looking at the # of users that have a higher “XP” value and returning that number. (I suppose you could add a +1 to the equation since hypothetically the top user would have 0 users above them so it would display a 0 instead of a 1)

Regardless, I can’t figure out how to do this on a basic text field. Here is my best shot with no luck. What am I missing here?

Hi there, @brandon8… it seems (to me, at least) that what you are showing should work. I just created a quick example (although, I used Current User instead of Current Page User in the constraint), and it worked as expected. One thought does come to mind… any chance you have a privacy rule on the User data type that is stopping the users from being found in searches?


1 Like

Wow! Good call. You were right. That data was being blocked via the Privacy settings. I would have never figured that out. Thank you sir!

1 Like