Sort
Syntax
Sort [field_name]
Sort Up [field_name]
Sort Down [field_name]
Sort Blanks Last
No Sort
Parameters
- field_name: Optional. The name of the field to sort on. The field must be designated as a "search" field in the Design Screen. If omitted, the sort is performed on the most recent event result.
Description
Sorts a listing of entrants based on one or more fields or on an event result. This is essential for correctly ordering finishers by net time in races with wave starts, where the true order of finish differs from the order runners crossed the finish line.
Remarks
SortandSort Upare identical -- both sort ascending (low to high).Sort Downsorts descending (high to low).- You can sort on multiple fields by issuing multiple
Sortcommands. For example,Sort STATEfollowed bySort TOWNproduces towns sorted within each state. - When used without a field name,
Sortsorts on the most recent event. The most recent event can be a computed event such asTotal Eventsor a time computed with theMinuscommand. - RunScore uses a stable sort algorithm: if two entries have the same value, their original relative order is preserved. This is important for cross-country scoring where finish order matters for ties.
Sort Blanks Last
Normally blank fields sort at the beginning of a list. Use Sort Blanks Last to place entries with blank values at the end. You can mix this with regular sorts -- use Sort Blanks Last only on those fields where you want blanks at the end (for example, non-finishers of a triathlon split).
No Sort
By default, events are sorted by time. If you do not want sorting done on an event, add the No Sort command after that event:
Event TIME
No Sort
If there are several events such as in a triathlon, sorting is done on the last event. Use No Sort after that event to prevent it, or add a Sort command after the event you want to use for the final ordering.
In cross-country races, results are typically based on order of finish. If two runners have the same time, they must be entered in the correct order. If splits are recorded and a sort is done on each split, the finish order could change. In this case, use No Sort on all events to preserve the entered finish order.
Examples
Sort registered runners by last name, then first name:
Select NO.
> 0
Sort LAST NAME
Sort FIRST NAME
Field NO.
Field FIRST NAME
Field LAST NAME
Field SEX
Field AGE
Produce results ordered by net time, not finish order:
Event FINISH_TIME
No Sort
Event NET_TIME
Sort
Sort a triathlon split with non-finishers at the end:
Sort Blanks Last
Sort BIKE_SPLIT