Re: Forms 4.5 insert validation question

From: Bob Acker <program_at_icanect.net>
Date: 1997/06/13
Message-ID: <33A17A3D.195F_at_icanect.net>#1/1


You can add code to the trigger in your form attached to the save button or save menu choice to do a select count keycol from the detail table where
linking col = linking col. If the count is 0 then raise form triger failure.
This will prevent the save.
Else allow the do_key('commit_form').

This isnt elegant, but it should work.

David-Michael Lincke wrote:
>
> I'm rather new to Forms development an have a problem concerning input
> validation for detail records in a 2 block master-detail form which I just
> can't seem to find a solution for. So here goes:
>
> A 2 block master-detail form (orginally generated using Designer/2000; the
> detail form is an interesection table, so its fields are not shown and are
> populated through an LOV from a lookup detailed table usage), the master
> block only shows a single record at a time and allows for query, insert,
> update and delete; the detail block also allows for query, insert, update
> and delete but shows 6 records at a time (populated through LOV).
> Now what I want to accomplish is that a newly created master record cannot
> be saved without there also being at least one related detail record being
> created. What's the best approach to take here? Any help is appreciated.
>
> dave
>
> --
> David-Michael Lincke
> Research Assistant
> Institute for Information Management IWI-HSG, University of St. Gallen
> EMail: David-Michael.Lincke_at_iwi.unisg.ch, dlincke_at_bandon.unisg.ch
> URL: http://www-iwi.unisg.ch/about/team/dal.html
  Received on Fri Jun 13 1997 - 00:00:00 CEST

Original text of this message