Skip to Main Content

Oracle Forms

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Unuable to insert row after delete it true a form

Lela23Oct 10 2024 — edited Oct 10 2024

I insert a record true form (specific data block) using a list value. List value contains several attributes that describe element an it populate several fields in a form and the same columns in a table. The goal that I want to achieve is to allow user to insert value in a form only using list. In order to do that I disable all fields except one which have list value connected to it. The problem with enabled field is that can be erase by user.

(disabled fields are mark with red frame, enabled field contains number 1002)

In order to solve that I create WHEN-VALIDATE-ITEM trigger with this code (ID_ELEMENTA is field that can be erase):

if :zahtev_elrad.id_elementa is null then
:zahtev_elrad.tip:='';
:zahtev_elrad.napon:='';
:zahtev_elrad.oznaka:='';
:zahtev_elrad.grupa:='';
:zahtev_elrad.rbr:='';
:zahtev_elrad.rbr_izv:='';
:zahtev_elrad.sifra_ems:='';
:zahtev_elrad.sistuz:='';
end if;

This works. When somebody tries to erase ID_ELEMENTA (1002 in the picture) everything that is connect to that element has been erased in database after saving change through form.

After this operation I want to insert a new record in the same filed that is empty now. I select value from a list, save it and the form gives me message that 1 record has been save. The problem is that I don't see this record in the table in database.

When I exit form and enter it again I can see that specific filed is empty because it didn't save the change. I enter new value from the list again and save it and this time everything works OK.

Can somebody help me.

This post has been answered by Lela23 on Oct 14 2024
Jump to Answer
Comments
Post Details
Added on Oct 10 2024
7 comments
285 views