Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> master-detail forms 5.0

master-detail forms 5.0

From: Mark S. Reichman <reichmanm_at_removethis.rl.af.mil.>
Date: 9 Feb 99 16:05:04 GMT
Message-ID: <36c05cb0.0@news.rlcn.rl.af.mil>


I'll keep it simple and easy. Because actually it seems to be..

I have a master-detail realation in forms 5.0.

I have:

One master block, ofcourse, and one detail block. The relation is master.ship_id = detail.ship_id.

Prevent Masterless Operations = Yes
Deferred                      = No
Automatic Query               = Yes

Heres the deal. I want to make sure that at no time can a person insert a master record without also inserting at least one detail record. No commits allowed with Master records only. (inserts or updates) There doesnt seem to be a
option in the relation object to satisfy this criteria. The master record represents a shipment with the customer name and destination and the detail records are actually the items being shipped. It would make no sense to have a shipment and ship nothing. I thought about doing:

go_block('detail')
first_record;
if :nomenclature is null then
  message('You have not shipped anything');   raise form_trigger_failure;
end if;

But, you cant 'go' anywhere unless its a trigger that allows restricted built-ins. I would need to do the above code after a master block validation and before a master block commit.

Or not...

Ideas, suggestions are welcome... Received on Tue Feb 09 1999 - 10:05:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US