🥇🥈🥉 Convert Number Score to Rankings in Glide!

Oof. Good catch. Yes, for sure.

@Darren_Murphy has also noted the other types we need Sort Array does not work on arrays of dates · Issue #58 · glideapps/glide-code-columns · GitHub

I’m still going to use it though. Thanks @Robert_Petitto. I needed a good use case to crack open tutorials on Array column stuff.

3 Likes

Ya…this is disappointing.


@david I submitted an issue: Sort Array column does not sort numbers · Issue #85 · glideapps/glide-code-columns · GitHub

Hola @Robert_Petitto and @JackVaughan

Very weird the situation, I tested that plugin days ago and worked perfectly using a Number or Text column, it was even very smart by sorting the array.
Today I retested it and it still works perfectly!.

Here my result when my Num column is Number type
image

image

and here when my Num column is Text type. The plugin was very smart to recognize that all text values were numbers and could sort it perfect. Otherwise, the sequence would have been different (what Robert has).

image

Regarding the sorting an array of dates, this is true, the plugin fails. Here I wrote an advise to David about this issue:
🆕 20 new experimental code columns to play with - #33 by gvalero

Saludos!

3 Likes

@gvalero you’re right. It does sort arrays of numbers correctly. @JackVaughan @Robert_Petitto how did you guys manage to break it? :thinking: :rofl:

Okay, I think I figured out how it breaks. It depends how you create your array.

  • If you create the array via Joined List → Split text, then pass that to the Array Sort, then it breaks. (It actually does a lexical sort instead of a numerical sort)

  • But if you create the array via a Lookup (as @david suggested), then it works perfectly.

4 Likes

It breaks when I’m sorting the Unique Array: @JackVaughan @david

2 Likes

Updated video. See original post :point_up:

1 Like

Cool tutorial for leaderboards!

One question - how would you display ties?

For example) display as “Tied for 3rd”

I assume you would have to use (at least) ITE and Template columns… the Template being the result of the ITE and your text, but how would the ITE work?

Would this be an example of when you would need a conditional relation? :thinking:

Thanks again for the tutorial!

There is a lot of discussion on ties in this thread.

2 Likes

I’ll check it out - thanks Jeff!

1 Like

What I would do is continue on by creating a multiple relation from the ordinal rank column to itself. Then create a rollup column to see how many times that rank exists. Then create an if then else column that looks to see if the Rollup is greater than one and if so results in “Tied for” else blank. Lastly, create a Template Column that starts with that if then else and ends with the rank.

4 Likes

:fire: :fire: :fire:

Awesome!

Thanks Bob!

Just to add to my dilemmas of ranking. Each position entry needs to be sorted into categories prior to ranking.
For the life of me, I just can’t seem to find a workable option other than creating multiple sheets for the same event.
I’m a medic by profession so forgive my data naivete.

Nah. Just create a multiple relation from the category back to itself. Then, the very first lookup column will be based off the relation column and not just the sheet column.

6 Likes

Robert, I have had a degree of success with rankings based on time but I still seem to have a blind spot around separating the multiple categories.
My sheet is divided into three main components.

  1. Time entry to rank ( no issues)
  2. Class is divided into Elite, Competitive & Open.
  3. Sex, Male/ Female
    Creating a rank for the various class and sex categories from one sheet is the goal.
    Please advise.
    Capture|690x165

So there may be an Elite - Male and an Elite - Female and a Competitive - Male, etc. and you want individual rankings within these class/sex combos?

1 Like

If so, create a template column combining the Class column and the Sex column (eg. Elite-Male), and then do a multiple relation to self from/to this template column (as instructed in my previous reply):

2 Likes

Cheers.
Sorry for the late reply, I’m in New Zealand.
I’ll let you know how that pans out.

1 Like

Robert I am having massive success with your recommendations. Unfortunately when I try to tally the points for 3 races into a leader board my results are not displaying correctly in the app.
So to be clear the points are added together correctly in the leader board sheet and showing the correct total, but when displayed in the inline list the Template relation seems to be having an effect on this calculated columns ability to display correctly.

Can you take a screenshot of where it looks correct in the data editor and then a second one that shows both the inline list and the data panel (lower left hand panel > “data”) where it displays incorrectly?

1 Like