Foriegn key concept not working with check table
In emp_personal table , the fields are empid, empname, dob for example. In this table, empid is the primary key field.
In emp_official table, the fields are empid, dept, designation for example. In this also, empid is the Primary key.
Now we relate these two tables using the foreign key relationship.
Now, emp_personal is the Check table .
emp_official table is the Foreign key table.
for example create some 5 records in the emp_personal table .
Table : emp_personal : Primary Key - empid
empid empname empdob Status
1 AAA 1.1.1990 Record saved successfully
2 BBB 2.2.1990 Record saved successfully
3 CCC 3.3.1990 Record saved successfully
4 DDD 4.4.1990 Record saved successfully
5 EEE 5.5.1990 Record saved successfully
Records are saved in the table : emp_personal.
Now, Am tryiing to create records in emp_official table.
Table : emp_official : Primary Key or not a Primary Key - empid
empid dept designation Status
1 Dept1 S.E Record saved successfully
2 Dept2 S.SE Record saved successfully
Now, if am try to create the record which is not in the table emp_personal, which has the empid = 6.Normaly it'll not allow us to create the record 6,
But the think is its allow to create.
6 Dept6 P.M Here also status is record saved
Kindly help me out.
did you read the documentation for "screen check"/"check required" flag in foreign key screen? it says:
Flag for check of input values wanted on screen
This flag defines whether an input check should be executed on the screen for the field. This definition is applies to all the screens on which the check field appears.
The check can be switched off again with the flag set for certain screens (by canceling the flag 'For. key' in the attributes of the corresponding screen field).
Switching off the screen check can be useful in the following cases:
if for test reasons there is to be no check
if a semantic foreign key is used for the aggregate definition but no input check is to be executed.