Form not allow user to leave blank on foreign key even the “ALLOW NULL” is granted


Form not allow user to leave blank on foreign key even the “ALLOW...
Author
Message
rsb1
rsb1
StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)StrataFrame Beginner (6 reputation)
Group: Forum Members
Posts: 6, Visits: 345
Dear Sir

If a form, which has a foreign key to another parent table, the form is save with leaving this foreign key blank. It encounter error when the form recall this record with error message. I have set this foreign key to accept NULL values. The problem not occurs when I cancel the relationship between the 2 tables. But delete the relationship will have no reference integrity checking with this foreign key fields.

Example:

Said the Employee table has a foreign key to Tax table. So, there is a need to have a relationship between “Employee” vs “Tax”. So that the reference integrity can be checking. But not all the employee entitled Tax. In this case, when my Employee form is saved with Tax field is NULL, next time reopen the employee form will prompt error message.

Andrew
Reply
Ivan George Borges
Ivan George Borges
Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)Strategic Support Team Member (4.9K reputation)
Group: StrataFrame MVPs
Posts: 1.9K, Visits: 21K
Hi Tiong.

Guess I got it wrong when I read your first post. Maybe you should leave your foreignkey NULL and deal with the NULL value. Have a look at the BO Mapper and the properties' Custom Field Properties. There you can deal with the NULL Value Option. To get you started, go to the help file under "Application Framework" / "Business Layer" / "Business Object Mapper" / "Customizing a Field".
Edited 15 Years Ago by Ivan George Borges
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search