HELP ME RANK PLEASE
I have a table in Ninox, lets call this table, Table A. This table consists of the column Name of cars, and Scores. Please see the screenshot in the attachment. Which scripting code can I use rank these cars?
So logically, I need to sort the score of the cars descendingly. The first score on the very top (highest score) should be ranked as 1, second highest should be ranked as 2, and so on.
Which coding should I use to achieve this? I am new to coding so I really need help on this!
Thank you very much.
Best regards,
Vinson Javiero
6 replies
-
Are you asking for code that you can put in a button that will rank the records for you?
-
Hi Fred, thanks for the reply. Yes I am asking for the code that I can put into the formula field to rank the records. Could you please help me with this please?
Best regards,
Vinson Javiero -
You can put this in a button in any table:
let myCount := 0; let getCars := (select TableA); for loop1 in getCars do let xScore := loop1.Score; let myCount := cnt(getCars[Score > xScore]); loop1.(Rank := myCount + 1) end
This is assuming Rank is a number field.
Content aside
- 1 yr agoLast active
- 6Replies
- 62Views
-
3
Following