Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: master-detail forms 5.0
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
![]() |
![]() |