The Sort Editor
A Sort reorders records according to value in the database. It is common to Sort records.
Sort Editor, temporarily sorting the database records
Play Movie: tH_Sort_.MOV
To view records on screen in a particular order.
Before printing a report or labels.
Before graphing data.
When data is first entered into the database, CommerceExpert/WebClerk stores the records in the order in which they are entered or imported. When records listed in an Output layout are printed, they print in the same order as listed. Often, records need to be viewed or printed in another order. For example, an alphabetize a list of names may be needed in a report. A Sort on the Last Name field, reorders the records alphabetically by Last Name.
A Sort can be done from an Output layout. Sorted records are then displayed in the Output layout.
CommerceExpert/WebClerk conducts indexed sorts very quickly. If the Sort is on one field and that field is indexed, CommerceExpert/WebClerk uses the index. Therefore, the sort is very fast.
Records can be sorted on up to 30 different fields. Each field used in the Sort is referred to as a "Sort" level. The first field used in the Sort is called the primary "Sort" field. The other fields are called the secondary "Sort" fields.
For example, the results of a two-level ascending Sort on the last name and first name fields would produce a list such as this:
Ascending and Descending Order
An ascending or descending order can be specified for each field used for sorting. Sorting from A to Z or smallest to largest is known as an ascending sort. Sorting in the reverse order is called a descending sort — largest to smallest, latest to earliest, and Z to A.
If the sort involves more than one level, Ascending and Descending Sort orders can be freely used. A multiple-level Sort can mix fields and Ascending and Descending Sort order.
The Sort Editor
Go to: Actions > Sort... to open the "Sort Editor".
The "Sort Editor" contains the:
Fields area, displaying the names of the fields in the current file. Fields from related files can be used in the Sort. For information on which files have automatic relations see the appendix. Indexed fields are shown with an "i" or "u".
Sort Fields area, displaying the "Sort" fields and the order of the Sort. The field in the first row of the "Criteria" area is the Primary Sort field. An "A" or "D" on the right of the chosen field specifies an Ascending or Descending sort.
Name of Stored Sorts area on the lower right.
Add button adds fields to be sorted.
Sub button subtracks fields from the Sort.
Insert Button, inserts a field to be Sorted.
Sort Button, used to initiate the Sort.
Search Button, opens the "Search Editor" so the selection of records to be Sort can be changed.
New Button, saves the defined Sort for future use.
Delete Button, deletes saved Sorts.
The records in the file and current selection are display at the bottom of the window.