You are here: Commands > Index > Sort Order

Sort Order

The sort order of the index file can contain as many fields as you want up to a maximum key length of 255 and each field may be in ascending or descending order, independent of the others. The records are sorted based on the field values in the order in which the fields are selected. The first field selected is the first sort key and so on.

The Find Literal and Seek Expression options of the Search command only operate on key index fields which are both character type and in ascending order. You can include non-character or descending fields in an index file and still use the Find or Seek commands. However Find and Seek will only operate correctly if the first key fields are in ascending character order.

For more information on moving directly to specified records in a file, see Search.