Oracle Forms 10g: how do I force user to enter child records on creating a new parent record

68 Views Asked by At

I am developing a form using Oracle Forms 10.1.2.0.2. It has multiple tabs. In one of the tab, there is a parent block, and two child blocks. The requirement is that when the user enters a new record in the parent block, we have to force the user to enter details in the child block as well. User cannot change tabs or save the data till the parent - child data is entered well.

I have written a function that will:

Go to the parent block

    Go to the first child block
    check number of active records
    if active records are zero, raise form trigger failure

    Go to the second child block
    check number of active records
    if active records are zero, raise form trigger failure

I am calling the function in WHEN-TAB-PAGE-CHANGED trigger and KEY-COMMIT triggers.

If I try to change the tabs, it shows me the error and stops. But if I press the CTRL + S button or click the SAVE button, it shows the error message but then saves the data.

Is there any other good way to achieve the above requirement.

0

There are 0 best solutions below