| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Trigger - Validation on Exit
hello,
Just a general note, it is not a good idea to put validation logic
in key triggers, it will make conversion to forms 4+ difficult. I do
understand your requirement to position the cursor on a field when an
error occurs. The way i did this was to set up a variable (a hidden
field or global variable) in the 'ON-VALIDATE...' triggers and then
check it in an 'ON-NEW-FIELD-INSTANCE' trigger. This is the only
'ON...' trigger which allows you to move the cursor position. This
trigger fires immediately before control is returned to the keyboard.
It works fine.
graham (aka grumpy)
Ian Dunn <ian_at_idunn.demon.co.uk> wrote...
| Hello ORACLE people
| I am using Forms 3 and Oracle 6 and I could do with some advice about
| trigger usage for validation and navigation. Basically, I have a small
| procedure, for example
| proc aa is
| begin
| if x is not null then
| if y is not null then
| go_field(‘x’);
| else
| message(‘error’);
| end if;
| end if;
| end;
|
| Ideally I would like it to go in the ON-VALIDATE-FIELD trigger, but I
| can’t due to the go_field, so I have put it in the KEY-NXTFLD trigger.
| Most of my other field validations use this trigger and when I do EXIT
| or COMMIT, if there is anything wrong then I am informed and then
| prompted with if I want to quit or not, which is what I want to happen.
| (By the way on the KEY-EXIT trigger I have exit_form and on the KEY-
| COMMIT trigger I have commit_form followed by exit_form.)
|
| BUT..ideally I want this procedure to work in the same manner. So I
| have put proc aa in the KEY-EXIT and KEY-COMMIT triggers, which works OK
| but I don’t get the option to quit if an error occurs. Do I have to
| live with this!!
|
| Thanks in advance.
|
| --
| Amanda Pickard
Graham Miller ...
Opinions expressed are mine, they are free, and worth exactly what they cost.
Received on Thu Jun 19 1997 - 00:00:00 CDT
![]() |
![]() |