Sorting Records


There is a lot of information regarding sorts in the FileMaker Pro on-line help system.  Press the F1 key to view the FileMaker Pro help file...  Here are some extracts...

FileMaker Pro stores records in the order they were added to the file. Sorting temporarily rearranges records, so you can view, update, or print them in a different sequence.
You choose the fields whose contents you want to sort by. The first sort field arranges the records based on the field’s contents. The second sort field arranges records when two or more records have the same value in the first sort field, and so on. You can sort records in ascending order, descending order, or in a custom order.

The records remain sorted until you perform a find, add new records, or sort the records again.

To sort the records in the current found set:

1 In Browse mode, choose Records menu > Sort.
2 In the Sort Records dialog box, choose fields for sorting, in the order you want them sorted by. See options for sorting records. 
3 Click Sort. 

To cancel before sorting is finished, press Esc (Windows) or Command-period (Mac OS.) 

Notes and Tips about sorting records

Copyright © 1994 - 1999 FileMaker, Inc. All Rights Reserved.

Options for Sorting Records

To  Do this
Choose a sort field and sort it according to the selected order In the fields list, double-click a field.
Assign different sort orders to fields as you add them to the Sort Order list  For each sort field, in the fields list, select a field, select a sort order, then click Move.Ascending order is first to last character in the alphabet for text, lowest to highest for numbers, and earliest to latest for dates and times. Descending order is last to first character in the alphabet for text, highest to lowest for numbers, and latest to earliest for dates and times.
Change the sort order of a field in the Sort Order list (for example, ascending or descending order) In the Sort Order list, select a field, then select a sort order for that field.
Sort in a custom order, according to the order of values in a value list (for example, in the order months are arranged)  In the fields list, select a field, select Custom order based on value list, then choose or define a value list. (See information about defining a list of values for data entry)Records with values not in the specified value list will be sorted alphabetically at the end.
Change the order of the sort criteria (for example, to sort first by Region, then by City)  In the Sort Order list, click the double-arrow (to the left of the field name) and drag the field to a new position.
Include related fields anywhere in the sort order  Choose a relationship from the relationship list, then double-click a related field in the list.

You can place a related field anywhere in the Sort Order list -- before, after, or between fields in the master file.

If more than one record in the related file matches a record in the master file, the sort will use the value in the first matching record in the related file, according to the sort order defined in the relationship. See information about defining relationships for relational databases.

Sort related records (rows) in a portal  If your access privileges allow, specify a sort order in Define Relationships. See information about defining relationships for relational databases.
Remove a field from the Sort Order list
In the Sort Order list, double-click the field.

 Remove all fields from the Sort Order list Click Clear All.
Sort by summary fields For example, to sort sales regions in order from highest to lowest total sales. See Sorting records by sub-summary values. 
Unsort the records (return them to creation order) Click Unsort.
Sort records according to a different language than the one used for indexing Select Override field's language for sort, then choose a language.
Close the Sort Records dialog box without sorting Click Done.
Notes about sorting records

Copyright © 1994 - 1999 FileMaker, Inc. All Rights Reserved.

· Data sorts differently in different field types:
This field type  Sorts data in this order
Text  Alphabetically. Numbers sort by character position. (Example of an ascending sort: 1, 11, 2.) Numbers sort before letters. Non-alphanumeric values are ignored (unless you change the sort language to ASCII).
Number  Numerically. Non-numeric characters are ignored.
Date  Chronologically

To avoid confusion when using dates, always use four-digit years. For more information about how FileMaker Pro handles Year 2000 issues, see 

Time  Numerically. Times using AM/PM are sorted according to their 24-hour-clock equivalent (for example, 8:00 PM is 20:00).

Records in a sorted portal are re-sorted whenever the relationship is re-established. (For example, when you browse out of and then back into the record, or change the value in the match field.)

Repeating fields sort by the value in the first repetition. 

If you add records after sorting, the status area shows Semi-sorted. Sort again to incorporate new records in the sort order.

System formats affect the way numbers, dates, and times sort. 

Copyright © 1994 - 1999 FileMaker, Inc. All Rights Reserved.