Re: Creating a 'CANCEL' button in Forms 5.0

From: Steve Cosner <stevec_at_zimmer.csufresno.edu>
Date: 20 Apr 1999 15:17:39 GMT
Message-ID: <7fi5qj$4tu$1_at_nntp.csufresno.edu>


In article <7fhvvv$ja6$1_at_nnrp1.dejanews.com>, <dhancock_at_voicenet.com> wrote:
>I would like to have a 'cancel' button right next to my 'save' button on a
>forms 5.0 application.
>
>The save button will:
>DO_KEY(COMMIT_FORM);
>
>I want the cancel button to rollback all changes to the last commit by that
>users. The problem is I don't know what code to place there...it seems if I
>use a SQL rollback that it clears the form...I guess this is because the
>button is associated with an anonymous datablock.
>
>Any help would be greatly appreciated,
>
>Also does anyone know of any forms templates that are around which may already
>have navigation and form control built-in....I would like to roll-out some
>templates to my team, but would like to get some ideas first.

First on templates, I don't know of any. We have built a "skeleton form" that all new forms are started form. But it wouldn't be of much use for you since it has major dependencies on our database tables.

As for the rollback button, the clear form is the first thing you have to do. You first have to undo any changes the user has made, and the clear form is the only way forms can do this, since changes lock records on the database, etc. But you could go one step farther, as we have in some cases -- re-display the data based on the user's initial query. We have standard procedures to call to display based on specific key values that are saved from before the clear-form, and these are used in the subsequent display process.

hth
Steve Cosner



http://members.aol.com/stevec5088
Downloadable Quick Access utility form: Display and update any table. Received on Tue Apr 20 1999 - 17:17:39 CEST

Original text of this message