Re: Which triggers to use?

From: Peter H. Larsen <plarsen.nospam_at_dc.dynares.com>
Date: Tue, 30 Jun 1998 14:00:10 -0400
Message-ID: <359927A9.36D90AC5_at_dc.dynares.com>


Hi Chris,

If you want Oracle to validate fields, you use the *validate* triggers. If you want to validate something entered in a field you use the when-validate-item. This is of course based on an data-entry form.

What you mean by "right then and there" I don't know, but use then WHEN-VALIDATE-ITEM and it fires the moment the user tries to leave the fields (with the exception of key-prvfld). This will for instance occur if the user presses enter or clicks on another field with the mouse. If the trigger raises FORM_TRIGGER_FAILURE, the focus will NOT leave the field and the user is forced to resolve the error.

chris.rasmussen_at_usa.net wrote:
>
> I am still in the process of getting used to Oracle's (Forms 4.5) triggers.
>
> I have a date field called date_received.
> I have an alert that is set up with style Stop, one button (OK).
>
> When the person enters a new record, I would like to have the user notifed of
> any errors right there and then (without even moving off the record). If I
> use a When-New-Item instance as a trigger on this item, the only time this
> fires is as I either move onto (as in an edit mode) or when I move back onto
> after entering it (as in Add mode).
>
> When the person goes to save the record, I'd like for this trigger to fire,
> and then put the person in the field that needs to be corrected. So, I set
> up a When_Validate_record trigger that should fire whenever I begin to save
> the record. My alert will fire, but it doesn't acutally stop the action and
> insist on a corect date (it just goes ahead and saves the record as is after
> the message.)
>
> Any help will be appreciated!
>
> -Chris R
>
> -----== Posted via Deja News, The Leader in Internet Discussion ==-----
> http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum

-- 

Peter H. Larsen, Oracle and Applications specialist
Dynamic Resources Inc, Alexandria
Phone: 703-914-9800  #103
Fax: 703-914-9804
Email: plarsen_at_dc.dynares.com
(please remove the nospam from the header when replying to this email)

The above views are my own and does not reflect the views of my
employer.
Received on Tue Jun 30 1998 - 20:00:10 CEST

Original text of this message