Re: commit when leaving record

From: Huwski <no email>
Date: Wed, 08 Jul 1998 11:41:40 GMT
Message-ID: <35a35a57.16628682_at_news.geccs.gecm.com>


On Tue, 7 Jul 1998 18:49:22 -0700, "Michael Toomey" <michaelt_at_americanrecruitment.com> wrote:

>hopefully a simple question...
>
>would like to have a form commit changes, if any, before leaving
>a record. concept is this: we don't want to have 20 outstanding
>commits if the user doesn't hit "save". we would like to immediately
>have the user asked "would you like to save changes" upon
>navigating to another record.
>
>i've tried adding a check to the record status in post-record and
>when-validate-record. but a commit is not allowed in either of
>those.
>
>do i have to add this for every possibility of leaving the record
>(next record, prev record, delete record, etc.)? or can i adjust
>the savepoint or ??
>
>i must just be missing something b/c it seems that this must be
>a fairly common requirement... after all, it really sucks if you
>make 30 "good" changes and then your 31st is bad. you don't
>wanna rollback all 31...
>
>thanks for any help.
>-mt
>
>mailto:michaelt_at_americanrecruitment.com
>
>
Michael, try using the 'WHEN-NEW-RECORD-INSTANCE' Trigger, This WILL [Quoted] allow you to use 'restricted' built-ins ( commit and so on ).

Extract from oraclle Help:

WHEN-NEW-RECORD-INSTANCE Fires when the input focus moves to an item in a record that is different than the record that previously had input focus. Specifically, it fires after navigation to an item in a record, when Oracle Forms is ready to accept input in a record that is different than the record that previously had input focus.

Fires whenever Oracle Forms instantiates a new record.

Definition Level: form or block

Legal Commands:
SELECT statements, unrestricted built-ins, restricted built-ins

Enter Query Mode: yes

Usage Notes:
Use a When-New-Record-Instance trigger to perform an action every time Oracle Forms instantiates a new record. For example, when an operator presses [Down] to scroll through a set of records, Oracle Forms fires this trigger each time the input focus moves to the next record, in other words, each time Oracle Forms instantiates a new record in the block.

On Failure:
no effect

Fires In:
Refer to the following process flowchart in the Oracle Forms Reference Manual, Vol. 2, Chapter 8, "Processing Flow Charts":

Return for Input


Copyright (c) 1994, Oracle Corporation. Received on Wed Jul 08 1998 - 13:41:40 CEST

Original text of this message