Show TOC

 Error Message in the Foreign Key CheckLocate this document in the navigation structure

Use

The foreign key check tests if the check table contains a record with the key given by the values in the foreign key fields. If this check fails, a standard message is output. This standard message can be replaced with any message in the definition of the foreign key.

Up to four placeholders can be used when defining this message. The system automatically fills the placeholders with the contents of the foreign key fields and the name of the check table.

The system fills the first three placeholders with the contents of the foreign key fields assigned to the first three key fields of the check table (the client field is assumed). The system places the name of the check table in the fourth placeholder.

Example

A foreign key between foreign key table FKand check table CTis defined with the following field assignment:

Check table CT

Foreign key table FK

Client

Client

FIELD_A

FIELD_1

FIELD_B

FIELD_2

FIELD_C

FIELD_3

FIELD_D

FIELD_4

You enter the error message TEST 001with the text Entry &1 &2 &3 does not exist in table &4

in the foreign key. If the foreign key check for the values FIELD_1 = 'Value1', FIELD_2 = 'Value2', FIELD_3 = Value3' and FIELD_4 = 'Value4' fails, the following message text is output: Entry Value1 Value2 Value3 does not exist in table CT.

If the check table has only two more key fields in addition to the client, the system places the contents of the assigned foreign key fields in placeholders &1 an &2. The third placeholder contains the name of the check table.