Chapter 2-3
Edit Menu
Sort Datafile

Sorting Basics

iData 2 can sort records on the basis of the data contained in fields, or in the Freeform Text Area. It can treat that data as alphabetic text, as numbers, or as dates.

It can also sort records on the basis of the date when they were created, or of the date when they were last modified.

When sorting based on alphabetic content, that content can be treated as case-insensitive text, meaning that uppercase and lowercase characters are treated as being the same, or as case-sensitive text, meaning that uppercase and lowercase characters are sorted separately.

In addition, when treating field content as alphabetic text, it is possible to first sort on the basis of one field, and then to sort each group of identical items in that field on the basis of the content of a second field. This cannot be done when sorting as numbers or as dates.

In all cases, the default sort order is ascending. In alphabetic sorts, ascending means sorted in alphabetical order. In numeric sorts, it means sorted in numeric order. In date sorts, it means sorting from earliest to latest.

It is also possible to sort in reverse, or descending order.

Using the Sort Dialog

To sort a datafile:

         1. Open the datafile in iData 2.

         2. Select Sort Datafile... under the File menu (or type option-command-S). This will bring up the following dialog.

         3. In the first (Sort By:) popup menu, select one of the following:

                   a. A field name

                   b. The Freeform Text Area item (The actual name of this item may vary.)

                   c. The Created Date item (each record has a hidden created date)

                   d. The Modified Date item (each record has a hidden modified date)

         4. If you have selected a field name or the Freeform Text Area in the first popup menu, select one of the radio buttons below it. Here is what these buttons mean:

                   a. Case-insensitive Text -- treat as alphabetic text, treating uppercase and lowercase characters as being the same

                   b. Case-sensitive Text -- treat as alphabetic text, treating uppercase and lowercase characters as being different

                   c. Standard Dates -- treat as dates (The routine for identifying dates is pretty flexible, and will use your settings in the Formats section of the International panel in System Preferences to decide what to do about short date formats (e.g., 02/05/03).

                   d. Email Dates -- dates in email messages can be rather strange in format. This option is will handle most dates in email messages.

                   e. Numbers -- treat as numbers (iData can handle decimal numbers, as well as integers, but this option may not work well for numbers preceded by alphabetic characters.)

         5. If you wish to sort in descending order, enable the Perform Reverse Sort checkbox.

         6. If you are sorting as case-insensitive or case-sensitive text, you may also select another field or the Freeform Text Area in the second (Secondary Sort By:) popup menu to perform a secondary sort on the basis of the same kind of content for that field.

Sorting Without the Sort Dialog

In addition to the more complete set of sorting options available in the Sort dialog, there is a faster way of sorting in List View.

         1. In List View, hold down the control key while clicking in a column (but not in a column header). The following contextual menu will appear:

         2. Select an option in the menu.

Note 1: Since freeform datafiles are always in List View, this works with them, too.

Note 2: If you control-click in an active text field, instead of seeing the Sort menu, you will get a menu with text-editing options.

 Return to Main Help Page