Home » Developer & Programmer » Forms » Master / Detail Relation question (Forms 6i / Oracle 9i db)
Master / Detail Relation question [message #579743] Thu, 14 March 2013 15:39 Go to next message
scuts
Messages: 2
Registered: March 2013
Location: United States
Junior Member
On a form I have 2 blocks, shown on different tabs. Relation created by forms wizard. The relation works great when navigating through the blocks, the details for the master are shown fine.

Example for this form is master block is a type of food. Detail block is list of ingredients.
When creating a new type of food, if it's = CAKE we insert records based on a select on another table into the ingredients table.
Else, the user has to manually create the ingredients.

Upon commit of the form on master block (must be saved to enable detail block tab), the ingredients are not displayed but are there. If I execute query by hitting F8, the records are present.

Why is the populate-details trigger not being fired or what am I missing?
Re: Master / Detail Relation question [message #579746 is a reply to message #579743] Thu, 14 March 2013 16:15 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
I assume the insert of the child records is done from a trigger in the form?
Simple answer - because the form has no idea you've just made it insert child records for the newly inserted master.
Normally when you enter a new master there are no children, so why would it try to populate the block with records that shouldn't exist?

Re: Master / Detail Relation question [message #579747 is a reply to message #579746] Thu, 14 March 2013 16:20 Go to previous messageGo to next message
mughals_king
Messages: 392
Registered: January 2012
Location: pakistan
Senior Member
try this link


http://www.oracle.com/webfolder/technetwork/tutorials/obe/forms/FormsMasterDetail/FormsMasterDetailOBE.htm



Re: Master / Detail Relation question [message #579748 is a reply to message #579747] Thu, 14 March 2013 16:26 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Cookiemonster
I assume the insert of the child records is done from a trigger in the form?

That's what I thought as well.

If that's so, you could try to run the POPULATE-DETAILS trigger manually (either using EXECUTE_TRIGGER or simply by copy/pasting POPULATE-DETAILS code into your own trigger (you'd put it after the INSERT statement)).
Re: Master / Detail Relation question [message #580034 is a reply to message #579748] Tue, 19 March 2013 09:35 Go to previous message
scuts
Messages: 2
Registered: March 2013
Location: United States
Junior Member
Thanks for all of the feedback. I apologize I am now just getting back to this. I tried the manual execution by populate-details and did not have success. Yes the detail records were inserted by a trigger. In the end I had to clear the form on commit and take the user back to the key block allowing them to see the master id of the record and navigate back through to see the records.

While not the ideal solution it will have to do for now.
Previous Topic: FRM-40202: Field must be entered.
Next Topic: Insert DATA in my DB on uppercase format
Goto Forum:
  


Current Time: Fri Mar 29 02:58:07 CDT 2024