AnsweredAssumed Answered

Ranking From a Script Button

Question asked by Jmcl07 on Aug 24, 2012


Ranking From a Script Button



My Question is about Ranking records. I am building two databases for horse events, the first one requires a total ranking based on the total penalties, if equal then the closest to optimum time and if still equal then to the dressage penalty. But the rank must only go to ten and cant include riders who have "E" in their penalties field or those that have a true value in the HC field. The Rank would be performed on a layout based on the classes table with a portal to the records in the competitor table.

The second database is a little more tricky, The rider is placed in two separate phases then placed overall. In the phases though, equal placings are allowed based on the riders percentage. The tricky part comes when allocating the points. When a rider gets a placing within ten they are given points which decide the overall placing - 1st, 10 points, 2nd, 9 points ... 10th, 1 point. However when riders are equal the points for the places that they have taken up are averaged and all riders who are equal receieve the average. eg. 3 rider tied for second would all receive the average of the points for 2nd (9 points), 3rd (8 Points), 4th (7 points) which is an average of 8, so the tied riders would receive 8 point. Also after an equal placing it goes to the next place as if the placing was not equal eg. if 3 riders were tied for 2nd, the next rider after the three would be 5th as the equal placing has taken 2nd, 3rd and 4th. Again if the percentage is "E" for eliminated or the HC field is true, then the riders don't place. The layout is much the same as the first database as the layout is based on a classes table, showing records in a portal from the competitors table for riders in that class.

I would prefer these to be on a script so I can press a button to set place, but dont worry about it if it is unachieveable.