Examples using keys

This topic has some examples that demonstrate the use of keys.

Linking to processes that are not parents

Process 2 is not a child of process 1. All contact records for the company (and associated persons) in process 1 should be displayed in process 2. The company record is stored as a parameter and compared to the contact keys.

Records are selected by matching up the first 6 places of the key (12 places would only return the company-related contacts).

Linking to external data

Generating keys for external data works much the same as in the previous example. You only need to change the parameter's Source to "External".

Key formation using free fields

Keys can be formed using data from records. In this case, free fields are used in this database to store the person key, if a contact person moves between companies in the database. The existing person record is neither deleted nor merged, preserving the associated records (contact history, interests etc.). The old company and person keys are copied to free fields in the new record (Co.Gr. to FreeC1, Co.No. to FreeN1, Pe.Grp. to FreeC2 and Pe.No. to FreeN2).

Note: This process could also be implemented using relationships and triggers.

To display the contacts with this person from the previous company:

  1. Define a new parameter called "Current person". Select Record under Parameters and Person under Type.

  2. The key defines which fields are compared to the fields stored in the parameter. The "Co.Gr. +Co.No. + Pe. Grp. + Pe. No. + Date" index is used for comparison purposes. The key is compared over the first 12 places (i.e. the company key and the person key).

  3. A click in the list of persons triggers two actions. Define the following actions for this command:

    The first line determines that the parameter Current Person from the process (process 2) is added to the parameter stack. The second line determines that child process 5 is started. The contacts are displayed in process 5.

  4. Determine which fields in the record parameter are compared with which fields in the index: