A key is a field or combination of fields in a table used to sort and locate specific records in the table. Typically, the value of the key field or fields is unique for each record in a table so a specific record can be located.

Using the Key Definition window, shown in the following illustration, you specify the fields that will make up the keys used to sort, store and retrieve records in the table you are creating. Each field in a key is referred to as a key segment. Dexterity allows you to create multiple keys for each table, with multiple segments in each key.

Refer to Dexterity Limitsfor more information about limits to the number of keys and key segments that can be defined for a table.

For example, a customer table typically would have two keys defined for it. One key could contain the Customer Name field, because this is the field a user would most likely use to search for a record. However, a customer name may not be unique. For instance, there may be more than one “John Smith”. To avoid this problem, each customer could be assigned a unique customer ID. A second key composed of the Customer ID field could be added to the table. This key would uniquely identify customers, even if they have the same name.

The Key Segments list displays the list of fields that will be used as segments in the key. Records will be sorted primarily according to the first key segment. Records that are identical for the first key segment will be sorted again by the second key segment. For example, if the Key Segments list contains two segments: [last_name, first_name], in that order, records will be sorted primarily by the last name, and records with the same last name entry would be sorted again by the first name.

Documentation Feedback