Key length and key definition

You can use data from other info areas to determine which records are displayed in a process.

Records are selected using the index fields. By determining the length of the key, you can specify which fields are used to select records.

Each index field requires a number of places in the index. The number of places used by a field is indicated in brackets in the index.

Suppose you want to define a process that displays companies, persons and contacts as follows:

  • All the persons are displayed for a company
  • All the contacts are displayed for a person

In this case, records are selected as follows:

  • All companies in the database
  • For each company in the database, all persons containing the company's key
  • For each person found, all contacts containing the person's key

The Co.Gr. + Co.No. + Pe.Grp + Pe.No index is selected for the Person info area:

  • Co.Gr. uses 2places
  • Co.No. uses 4places
  • Pe.Grp. uses 2 places
  • Pe.No. uses 4places
Note: These figures do not correspond to the length of the fields; the contents of the fields are stored in a compressed format.

The first 6 places of the person index contain the company key (Co.Gr. + Co.No). In order to select all persons in a company (based on the company key), click the Key Definition button.

Select the Company info area and set the key length to 6 (2 places for the company group and 4 for the company number):

To return all the contacts stored for the persons found, you need to compare the company and person keys stored in the person records (Co.Gr., Co.No., Pe.Grp and Pe.No.) to those in the contact records.

Because the key is compared with both the company and person keys, the length of the key is 12 in this case (2 + 4 + 2 + 4):

The info areas you specify under Key Definition need not be the same info areas as selected using the Select button.

For example, if process 1 displays a company, and process 2 is a child of process 1, the key defined for process 2 can refer to the company in process 1. You can also use parameters to select records.

The order of the info areas in the list determines the following:

  • Links within a process are always from top to bottom. The key defined for an info area selected under Selection can always access those info areas that are listed above it.
  • Navigation always takes place within the last info area entered. If this record is linked to a previous info area, both info areas are updated when navigating between records.
Note: If you select data using input parameters, you can still use the key to further restrict the records displayed.

Descending

Enable the Descending option to sort records by descending indexes.

For example, if you select contacts based on the date and time, the contacts are ordered by date and time. If you enable Descending, the most recent contact is displayed first.

Sum Total

If you enable this option for an info area, values are displayed as sum totals (if this is applicable). Other fields are left empty. Currency values are converted to the base currency first.

Condition

You can specify conditions that limit the records that are displayed. Click on the Condition field to define or edit the condition. Once you have defined a condition, the check box is enabled.

Note: If possible, use the index to restrict the number of records first. Applying conditions to a large number of records can impact negatively on performance.