Selecting Sort Fields for Queries and Reports
The Select Sort Fields screen specifies the fields by which data is sorted in a query.
The screen appears in the process of adding or modifying queries, as shown in Adding and Modifying Queries.
|                                Select Sort Fields  Query . . . . . TESTJZ  Test for Documentation   Entry . . . . . 00  Generic entry type (00-99 for reporting only)   Order A=Ascending D=Descending  A  Find (F16).   Break after change of . . . .  0  Number of sort fields, 0=No break  Records to include . . . . . .  1  1=All records, 2=One record per key  Seq.  Description   1.0  Date & Time yyyy-mm-dd-hh.mm       2.0  Name of job       3.0  User of job         Number of job         Current user profile         System name         Object         Object library         Object type         User         *FYI mode (simulation)       More...  Pink fields are generic (all types)  Green fields apply to this type only   F3=Exit F5=Display values F12=Cancel  F16=Find  F21=Select all F23=Invert     | 
The read-only Query field shows the name and description of the query.
The read-only Entry field shows the code and description of the entry type that the query processes.
The following fields control the presentation of the records:
Order A=Ascending D=Descending
The order in which the sorted records appear in the output.
Break after change of
The number of changes in sort fields that trigger a break in the output. If set to 0, there are no breaks.
Records to include
Whether to include only records on which values of sorted fields change. Possible values are:
- 1: Include all records
- 2: Include only the records on which values change.
The body of the screen contains one line for each field defined for the entry type specified for the query (shown in green) as well as one for each of several generic fields that do not depend on the entry type (shown in pink).
Each contains the following fields:
Seq.
A number determining the priority with which the records are sorted. For example, fields with the Seq values 1.0, 1.1, 2.0, 4.0 would have sort priorities in that order, regardless of the order in which they appear in the displayed list.
Description
A read-only text description of the field, as defined for that entry type or generic field.
To find a field in the list, enter a string from the field name in the Find field and press the F16 (Shift+F4) key. The cursor moves from the current field to the next field with a name that includes that string. If there are no more field names containing the string in the rest of the list, it searches from the beginning.
To select all fields, press the F21 (Shift+F9) key.
To invert the selection, selecting all fields that are not currently selected and deselecting those that are, press the F23 (Shift+F11) key.
