Re: When-Validate-Item fires twice ....
Date: 1997/12/02
Message-ID: <881082886.10564_at_dejanews.com>#1/1
In article <01bcfec0$70e59000$bd1b2299_at_default>,
"Santosh Parmanand" <sparmanand.removeit_at_msn.com> wrote:
>
> I have 3 blocks in a form. The first (B1) has only one record, the second
> and third (B2 and B3) are multi record blocks. All items on b1 are
> enterable/updateable. On B2 and B3 all items are navigable but only one
> item is updatable. The business requirement is that when the user
> mouse-clicks on any record in B2 or B3 the cursor should be placed in the
> enterable item in the block. This is done by a When-Mouse-Click trigger at
> block level on B2 and B3.
> Some items in B1 have When-Validate-Item triggers which display error
> messages and Raise Form_Trigger_Failure if item edits are not met. The
> problem arises when a user enters a invalid value in a B1 item and
> mouse-clicks on B2 or B3 items.
>
> First, When-Validate-Item on the B1.item fires and displays the error
> message, then the When-Mouse-Click on B2 or B3 fires and then again
> When-Validate-Item on B1.Item fires and displays the message again.
>
> The error message is displayed twice!
>
> Suggestions?
Try using the When-New-Item-Instance trigger in your blocks B2 and B3. It won't fire if the form detects a validation error in block B1.
I set up a test form similar to what you described, and the when-mouse-click trigger seems to try to move the cursor regardless of the validation error. If you MUST use the when-mouse-click trigger, you can get rid of the multiple error messages by putting a No_Acknowledge parameter on the Message command in the When-Validate trigger.
Note: PLEASE don't post to comp.databases.oracle. It is a defunct group, and most people can't even read it. Second, when you post to several groups, try to do it by cross-posting, rather than sending the message out multiple times.
Regards,
Steve Cosner
http://members.aol.com/stevec5088: The QA utility form has recently been upgraded. It's also available for Macintosh and Unix Forms.
-------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to UsenetReceived on Tue Dec 02 1997 - 00:00:00 CET