Assigning auto generated numbers (not sequentially) based ona criterion

Assigning auto generated numbers (not sequentially) based ona criterion

Guys,

Please help!!

Runner Ranking System

 

Objective:

 

To rank runners in India based on Speed and Distance across categories (distance run, age and gender).

 

Current format of application:

 

Timing input form: this form takes in data from the runner.

Fields trapped:

·          Name

·          E-Mail

·          Date of Birth

·          Gender

·          Distance run (5 kms, 10 kms, 21.1 kms, 42.2 kms, 50 kms, 75 kms, 100 kms)

·          Time taken (hh)

·          Time taken (mm)

·          Time taken (ss)

·          Name of the run

·          Chest #

·          Website of run

 

Results

 

For speed ranking:

 

I’ve created views for the different categories. Eg. For the 5 kms – Women category, I have created a view where I filter all records for Gender==Female & Distance run==5 kms, and I sort the view on Time taken (hh).

 

Q: This works fine, but I want to display the Rank as well. I tried using the auto generated number function but that function assigns a sequential number to every new record added. I need to add an auto assigned number to every new record based on a criterion (i.e based on the time taken).

 

Like wise, I need a rank for every category for each runner. How do I do this??’

 

For distance ranking:

 

For distance ranking, I need to display the total amount of kms run by a runner in each category. I.e. for a runner who has run 5 - 5 kms runs (and thus he has five instances in the table with Distance run==5 kms), I need to display Total = 5 * 5 kms = 25 kms.

How do I do this?