Sorting Data
Often you want to sort data after you retrieve it. Choose Records, Sort from the menu to open the window shown in Figure 3.3.
Figure 3.3 Use the Sort command to sort data.
NOTE
Sorting can be expensive in terms of computer power; if you need sorted data, it is best to perform any finds first so that you can sort only the found set.
To set up a sort, double-click the first field on which you want to sort from the scrolling list at the left. When it appears in the right-hand list (Sort Order), you can use the radio buttons at the bottom to choose how to sort it: ascending order, descending order, or a value list. (Value lists are discussed in Hour 4; they let you sort on an arbitrary order that you define.) To perform a complex sort, select each of the fields you want to sort by in turn, and choose the sorting option for it.
The two checkboxes at the bottom let you use a summary field for ordering data (more on this in Hour 5, "Printing Data") and to override the sorting language.
You can add more fields to the sort using the same process. Drag each field up or down in the right-hand scrolling view to order the sort. FileMaker properly handles sorting for text, numbers, dates, and times. If, for example, the topmost field is Name and the next one is Birthday, you sort the found set alphabetically and by birthday within that order.