Ranking Script based on type
I have a carnival database that i am quite happy with but I am now trying to improve it to reduce errors in data entry by users not familiar with FMP.
Currently i have a field where users manually enter the place given to an athlete based on their performance in that event. What i would like to be able to do is have the database run a calculation to automatically enter the place. The problem i have run into is that field events are ranked according to descending performance (ie 1.8 = 1st, 1.7 = 2nd etc) whereas track events are ranked according to ascending performance (12.5 = 1st, 13.6 = 2nd).
All the results sit on an athlete result table. I have two event layouts that will apply the appropriate sort to the portal according to the performance based on the event type ie either track or field. Is there a way that i can get the the database to identify whether the event is track or field, apply the appropriate sort and then apply a rank within the portal?
I have attached a picture of how the layout looks at present