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 -> Re: master-detail forms 5.0

Re: master-detail forms 5.0

From: Sanjay Gurnani <sanjay.gurnani_at_interpath.net>
Date: Tue, 09 Feb 1999 11:58:55 -0500
Message-ID: <36C0694F.282930F8@interpath.net>


Hi,
maybe u can try to put one default record in detail table.whenever user enters the master record and presses a commit,wheck whether there is ne existing record with that id ,if not then populate the detail table with one default record (using insert statement) with relevant id's and destination name as 'unspecified' which can be changed later. This may serve as an option for u.
let me know if it works
sanjay_gurnani_at_hotmail.com
sanjay

"Mark S. Reichman" wrote:

> 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:58:55 CST

Original text of this message

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