All datafiles can be sorted on the basis of the dates when the various records were created, or the dates when they were last modified.
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 sorted from earliest to latest. It
is also possible to sort in reverse, or descending order.
However, when sorting on the basis
of record content, freeform datafiles and field-based datafiles
must be handled differently.
The
next
section, below, explains the Sort Dialog for freeform
datafiles. To jump to the section on field-based datafiles,
click here. It is also
possible to perform a sort
without bringing up a Sort Dialog.
Freeform datafile records can be analyzed in
terms of the entire record, or in terms of an address block that
you specify for that datafile.
iData Pro can attempt to find
personal names or U.S. and Canadian postal codes, or you can
specify a particular word on a particular line to be used as the
sort key. This requires that you be consistent in how you enter
the data on which you will be sorting.
The most common reason for sorting
freeform data is to arrange records in order by names or postal
codes in address blocks. If you are consistent in how you lay
out your address blocks, sorting by names or postal codes should
work pretty well.
To sort a datafile:
1. Open the datafile in iData Pro.
2. Select Sort Datafile... under the File menu (or type option-command-S).
This
will bring up the Freeform Sort Dialog with the Name tab selected by
default. Each of the tabs will be explained below:
The Other tab (for sorting by Whole Record,
Created Date, Modified Date, or Postal Codes)
3. If this is a sorting task that you are likely to repeat fairly often for this datafile, you can name it and add it to the Sort Tasks sub-menu, under the Edit menu.
a. Select the Add to Sort Tasks Menu checkbox.
b. In the Task Name: text field, type a name that fits the sort task.
Because the data in field-based datafiles has a relatively detailed structured, iData Pro can apply that structure to 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.
When sorting based on the alphabetic content of fields, 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.
To sort a datafile:
1. Open the datafile in iData Pro.
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) popup menu, select one of the following:
a. A field name ("Last" in the example)
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. If you have set a non-standard Custom date
format in the International System Preferences--meaning a date
that is not in the same order as the standard for your System,
you may need to enable the Use Custom Setting for Standard
Date sorting
setting in Datafile Settings.
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.
7. If this is a sorting task that you are likely to repeat fairly often for this datafile, you can name it and add it to the Sort Tasks sub-menu, under the Edit menu.
a. Select the Add to Sort Tasks Menu checkbox.
b. In the Task Name: text field, type a name that fits the sort task.
8. Once everything looks correct, click the OK button.