When you choose Referential validation for a field, the field must be a foreign key or part of a compound foreign key. A compound key is a foreign key composed of two or more fields. To set up Referential validation for a field you must:
· Parent RI Cursor: Identify the Reference table, view or CursorAdapter containing the primary key that matches the foreign key field.
· Validation Cursor: Identify a Validation table, view or CursorAdapter with a primary key that matches the foreign key field.
· FK Tag: Select the foreign key tag you have created that links the foreign key to the primary key of the Parent RI Cursor and Validation Cursor.
· RI Update Rule: Select the Update Rule to apply.
· RI Delete Rule: Select the Delete Rule to apply.
· Picklist Builder: Use the Picklist Builder to set up Picklist Help.
That's an overview of setting up Referential Validation. Now, let's get to the details, but first let’s explain the Create Tag button.
Create Tag Button
The Create Tag button is visible only for fields in views and CursorAdapters. You can create an index tag definition automatically for a field in a view or CursorAdapter by clicking the Create Tag button.
The Create Tag button gives you a quick way to create a new tag that can then be selected in the FK Tag combobox.
When clicked, the Create Tag button adds a record to the Index Tags table, SDATADDIT, creating an index tag definition. The following rules apply to the creation of the tag definition:
· If a tag definition already exists with the field as the expression, a new tag definition is not created.
· The name of the tag is the same as the name of the field. If a tag already exists with that name, a number is added to the field name, starting with “1” and incremented until a unique name is determined.