post-text-item trigger in oracle form
Date: Mon, 22 Jun 1998 18:45:28 -0400
Message-ID: <358EDE88.60AE_at_acsatlanta.com>
I have two blocks which have master-detail relation. The detail block has a column, nameID, refering the nameID in the master block, but is not a primary key in the detail block. What I want to implement is to allow users to enter multiple records for this nameID or modify the records in the detail block without performing the SAVE action from the default menu, i.e., the data is populated in the database immediatly after entering or modifing.
Here is what I did:
- Design a post-text-item trigger associated with each item in the detail block
- In the post-text-item trigger, CHECK the record status, and update or insert a record based on the record status since the trigger is fired even when you exeute a query due to the master-detail relation UPDATE item in the table where rowid = :blockname.rowid since there is no primary key in the detail block COMMIT changes by using forms_ddl('commit') if notfound, INSERT a record into the table COMMIT changes by using forms_ddl('commit')
What I found is, somehow, the oracle form doesn't recognize the
insertion in the
post-text-item trigger although I could see the record inserted from
sqlplus after
entering a new value in a item. It just keep inserting new records when
you are modifing the same item in the existed record. The same record
will be inserted again if you perform SAVE action from the default menu
after entering a new value in a item. It works ok after the SAVE
action, i.e., update the record when you modify the item. It looks like
either "COMMIT" is not right or "where rowid condition" for updating is
wrong.
I am not sure how could I solve the problem. Any help is greatly appreciated.
I am using forms 4.5.6.1.2 on HPUX 9.04. Database 7.1.6.2.0. Received on Tue Jun 23 1998 - 00:45:28 CEST
