Sorting Records


FileMaker stores records in the order they were created but that's no reason for you to work with them in that somewhat random order. By running a sort, you can rearrange the order for browsing, printing, or updating. FileMaker uses the found set concept discussed on page 50 to search through select fields and then arrange the records as you desire.

You can sort records using single or multiple criteria, just like finding records. FileMaker's new contextual sort feature makes single-criterion sorts so simple that you'll probably use it far more often than the actual Sort command. No matter which way you trigger a single-criterion sort, you can arrange your records in one of three ways: ascending order, descending order, or a custom order based on a value list you create. If, like me, you can hardly keep right and left straight, let alone what's ascending and descending, How FileMaker Sorts What (Table 5.2) should help.

Table 5.2. How FileMaker Sorts What

CONTENT

ASCENDING

DESCENDING

Text

A to Z

Z to A

Numbers

1100

1001

Time

6:0011:00

11:006:00

Dates

1/1/9812/1/98 Jan. 1Dec. 1

12/1/981/1/98 Dec. 1Jan. 1


To run a contextual sort

  • While in Browse mode, right-click (Windows) or -click (Mac) on any field and use the drop-down menu to choose Sort Ascending, Sort Descending, or Sort By Value List (Figure 5.45). If you choose Sort By Value List, pick an item from the secondary drop-down menu. The records will be resorted based on your choice (Figure 5.46).

    Figure 5.45. Right-click (Windows) or -click (Mac) on any field and use the drop-down menu to make your sorting choice.

    Figure 5.46. After you run a contextual sort, the records are rearranged in descending order by street name.

To run a single-criterion sort

1.

Use any combination of the Find, Omit, and Delete commands to first narrow your selection of records for sorting. Of course, you can always sort the entire file.

2.

Choose Records > Sort Records (Figure 5.47). Or use your keyboard: (Windows) or (Mac).

Figure 5.47. To run a sort, choose Records > Sort Records.


3.

The Sort Records dialog box appears (Figure 5.48). On the left side is a list of the fields in your file. Select the field you want to sort with by clicking on an item in the left list, then click the Move button in the middle to place it in the right-hand window.

Figure 5.48. The Sort Records dialog box allows you to control which fields are sorted, the type of sorting used, and the order in which the sort occurs.


4.

By default, the field will be sorted in ascending order. If you want to change the type of sort, first click the field in the right-hand list, then click on the appropriate radio button (Ascending, Descending, or Custom) in the lower-left area of the Sort Records dialog box (Figure 5.49). See To set (or reset) a custom sort order on page 71.

Figure 5.49. After you've selected a field, you can change the type of sort by clicking the appropriate radio button (Ascending, Descending, or Custom) in the lower-left area of the Sort Records dialog box.


5.

Click the Sort button in the middle of the dialog box or simply press (Windows) or (Mac). If you want to adjust the results, choose Records > Sort Records again or use your keyboard: (Windows) or (Mac).

Tip

  • The Sort order will remain in place until you perform a new sort.




FileMaker Pro 8 for Windows and Macintosh(c) Visual Quickstart Guide
FileMaker Pro 8 for Windows & Macintosh
ISBN: 032139674X
EAN: 2147483647
Year: 2006
Pages: 184
Authors: Nolan Hester

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net