Working with records
You can sort records that meet certain criteria by using sort operators and sort keys. Sorting this way limits a sort to only the information you want.
When you combine sort operators and parameters, you create expressions (selection statements). For example, specifying “Smith” and “Nevada” lets you select only records that contain both words. For more information about using sort operators, see “Reference: Sort operators.”
Each record contains the same categories of information, such as names with addresses, items in inventory, or client data. Text is divided into records, and records are subdivided into lines, words, fields, or columns depending on the text format. The subdivisions can be used to set criteria for the sort. The way records are divided depends on how the record is formatted, for example, in a table or in paragraphs.
Each record on this list is sorted by the 1) the author’s name. 2) Each line is a record. 3) Tabs divide each record into four fields.
You can also extract records without sorting them. Extracting records allows you to collect the data you need and leave them in their original order.
To extract records without sorting |
1.
|
|
Click Tools Sort.
|
2.
|
|
Click File to sort and choose a file.
|
3.
|
|
Click New.
|
4.
|
|
In the New sort dialog box, type a name in the Sort description box.
|
5.
|
|
In the Keys (sorting rules) area, tab to the record subdivision boxes and type a value in one of the following boxes that corresponds to the part of the record you want to sort:
|
•
|
Line
|
•
|
Field
|
•
|
Word
|
If you want to define other sort criteria, type an expression in the Extract records box.
|
6.
|
|
Enable the Extract records without sorting check box.
|
To specify sort criteria |
1.
|
|
Click Tools Sort.
|
2.
|
|
Click New.
|
3.
|
|
In the New sort dialog box, type a name in the Sort description box.
|
4.
|
|
In the Sort by area, enable one of the following options:
|
•
|
Line (ends with one hard return) — sorts by line
|
•
|
Paragraph (ends with multiple hard returns) — sorts by paragraph
|
•
|
Merge record — sorts by merge record
|
•
|
Table row — sorts by table row
|
•
|
Parallel column row
— sorts by table column or parallel column |
5.
|
|
In the Keys (sorting rules) area, choose one of the following from the Type list box:
|
•
|
Alpha — sorts in alphanumeric order by letter and then by number
|
•
|
Numeric — sorts by number only
|
•
|
Date — sorts by date
|
6.
|
|
Choose one of the following from the Sort order list box:
|
•
|
Ascending — sorts from smallest to largest or first to last
|
•
|
Descending — sorts from largest to smallest or last to first
|
7.
|
|
Tab to the record subdivision boxes and type a value in any of the following boxes:
|
•
|
Line
|
•
|
Field
|
•
|
Word
|
If you want to further define a sort, type selection statements in the Extract records box.
|
•
|
|
When you extract records, the original file remains unchanged; the output file contains only the records you specified.
|
•
|
|
Key 1 is sorted first, Key 2 is sorted next, and so on.
|
•
|
|
You can also use parentheses to group parts of a selection statement.
|
•
|
|
You can sort only part of a document by selecting the text you want to sort.
|