Re: Forms 4.5 bug?

From: Stevec5088 <stevec5088_at_aol.com>
Date: 1996/05/10
Message-ID: <4n02ov$ir1_at_newsbf02.news.aol.com>#1/1


We worked around users committing from the "do you want to save your changes" dialog box by checking a flag in the pre-commit trigger. The flag is only set from the key-commit trigger, immediately prior to the commit_form. You have to do all validation successfully before setting the flag. The flag is checked AND cleared by the pre-commit trigger. If the flag has not been set, (user has clicked YES from the dialog box), then the pre-commit trigger issues a message saying "You must use the commit key to save changes" and halts the commit process.

This should work for you too.
Steve Cosner

> I have a form level KEY-COMMIT trigger that ensures at least one detail
> record exists on a master-detail form. Works fine; the trigger failure
> is raised with a message, except if the next thing a user does is to
> hit the exit button, or choose action/exit, Oracle presents its little
> dialog asking them if you want to save your changes. Oracle allows it,
> bypassing the KEY-COMMIT logic apparently. I ran the thing in debug,
> and :system.form_status was 'CHANGED', but there was no obvious
> indication that an error had occurred. When do those system error
> variables get set?
>
> Am I missing something? Do you have to re-do all your edits in the
> KEY-EXIT logic too? I tried passing the no-validate option into the
> exit_form built in if :system.form_status <> 'QUERY' (as recommended by
> online help) - but that trashes valid pending updates too. I only want
> to trash invalid updates.
>
> Is it still true that a user can back-tab out of a field and bypass the
> WHEN-VALIDATE logic?
...Yes, but the trugger runs when you leave the block or commit the form. Received on Fri May 10 1996 - 00:00:00 CEST

Original text of this message