Defining Order to Display Data
After defining the relations, you must select the order in which data is displayed.
In Order, names of keys available to organize registers are related.
Key determines classification order of registers and can have one or more fields.
Examples:
Unique key: Supplier Code
Code |
Store |
Address |
0001 |
03 |
R. Araújo Bonfim, 64 |
0001 |
01 |
R. Com. Fonseca, 99 |
0001 |
02 |
Av. Moraes, 60 |
0002 |
02 |
Av. Amador Bueno, 56 |
0002 |
01 |
R. Azevedo, 675 |
In classification of more than one field, file is organized by first field of key that determines general order and then by the second field and so on.
Compound key: Code + Store
Code |
Store |
Address |
0001 |
01 |
R. Com. Fonseca, 99 |
0001 |
02 |
Av. Moraes, 60 |
0001 |
03 |
R. Araújo Bonfim, 64 |
0002 |
01 |
R. Azevedo, 675 |
0002 |
02 |
Av. Amador Bueno, 56 |
Procedures
To define Order to Display Data:
1. | In Order, click key for organization. |
2. | If you want to organize data by a field that is not in list, click New Index (+). |
Window to define new index key is displayed. It can be formed by fields or, if necessary, by expression in AdvPL.
3. | Click option beside field Expression. |
Window with list of fields of main table is displayed.
4. | Click field to define organization and then click OK. |
Name of field selected is displayed in Expression.
5. | To define compound key, click New Index again and select other field. |
6. | Click OK to finish new index. |
Key created is related in Order.
7. | Click key to organize data and then End. |