The fourth and final form defines the field(s) whose value(s) form the Secondary Key(s). This form is shown in the screen below.
As with the Primary Key, you can create a secondary key with any file access method, thus allowing quick access to the records stored in the RMSfile by specifying the value of the field(s) in the Secondary Key. For example, the Secondary Key of an invoice record might be the customer number. This allows you to retrieve invoices quickly not only by the invoice number (assuming it is the Primary Key) but also by the customer number.
The Secondary Key, like the Primary Key, specifies up to eight different data fields that are 'concatenated' together to identify a particular record. As an example, suppose you do not need to retrieve all the invoices for a particular customer at any given time, but only those that were authorized by a particular purchasing agent within that company. A Secondary Key made up of the customer number and purchaser code would give you speedy access to just such information.
Unlike the Primary Key (of which there can be only one), up to 127 different Secondary Keys may be defined for each RMSfile. The Secondary Keys are stored in the RMS index file.