How does 'ranked by' work?

Hey bubblers, could anyone explain to me how the ‘ranked by’ method for lists works?

The Bubble reference states:

"Ranks a list of things by how similar or different they are from a target element, which should be of the same type. "

What I don’t understand:
How does it calculate the degree of similarity or difference?
Does this work on any data type?

I’m trying to rank users according to a number field (corresponding to a week, so Week 1, Week 2, Week 3. . . ), and I want the ranked list to show me users whose Week # is the closest to a target user.

So if the target user’s Week is 3, the list would have at the top, first Week 3’s, then Week 2’s and 4’s, then Week 1’s and 5’s, etc.

Perhaps the ranked by method is not the right way to go about this, since I’m trying to compare here a User type with a User field (week), but if so, I’m stumped on how to implement the ranking feature described.

Help much appreciated as always!

2 Likes

Hello Bubblers,

I am also interesting in this thread…

@emmanuel
Any inputs?

1 Like

Thanks a bunch @NigelG

This topic was automatically closed after 70 days. New replies are no longer allowed.