Difference between revisions of "CHANGE"

From Recital Documentation Wiki
Jump to: navigation, search
(Products)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
==Class==
 
Screen Forms
 
 
 
 
==Purpose==
 
==Purpose==
 
Full screen editing of records through a form
 
Full screen editing of records through a form
Line 195: Line 191:
  
 
==Products==
 
==Products==
Recital Mirage Server, Recital Terminal Developer
+
Recital  
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Commands]]
 
[[Category:Commands]]
 
[[Category:Screen Forms]]
 
[[Category:Screen Forms]]
 
[[Category:Screen Forms Commands]]
 
[[Category:Screen Forms Commands]]

Latest revision as of 14:39, 10 November 2009

Purpose

Full screen editing of records through a form


Syntax

CHANGE

[<scope>]

[FIELDS <field list>

[FOR <condition>]

[KEY <exp>]

[NOAPPEND]

[NOCLEAR]

[NODELETE]

[NOEDIT]

[NOFOLLOW]

[NOINIT]

[NOMENU]

[NOORGANIZE]

[NOWAIT]

[WHILE <condition>]


See Also

@...GET, @...MENU, @...SAY, APPEND, BROWSE, CREATE SCREEN, EDIT, FMT(), Function Keys, MODIFY SCREEN, READ, SET AUTOSAVE, SET FORMAT, SET LOCKWAIT, SET MENUBAR, SET MOUSE, SET NAVIGATE, SET QUERYMODE, SET UPDATE, SET VERIFY, SET WINDOW OF MEMO


Description

The CHANGE command provides the facility to edit records in the active table that match specified record selection criteria. The CHANGE command uses a default form to display and allow updating of the specified records.

When memo fields are displayed, the memo field label is in lower case if the field is empty, and upper case if the field contains text. If a memo window (SET WINDOW OF MEMO) is active, then the memo can be displayed and edited in the specified window. Otherwise, pressing the [INSERT] key or the [HELP] key on the memo field will popup a notepad editor. Pressing the [HELP] key within the notepad editor displays the memo editing keys available. These keys include facilities for reading from and writing to external files and printing on the system printer.

You can design your own forms using the Forms Designer (CREATE SCREEN). The Form Designer will automatically generate a format file that can contain @...GET, @...SAY, @...MENU and other display objects. This form will be used by the CHANGE command if it has been activated using the SET FORMAT command.

If the active table is shared, then automatic record locking will take place for each of the tables referenced on the form. The records are automatically unlocked when you skip to another record, or exit from the CHANGE command. If UPDATE is ON then 'Upd' appears in the 3rd box of the status bar at the bottom of the screen. When UPDATE is ON records are automatically locked before they are read from the database. When UPDATE is OFF, no record locking is performed. It is recommended that you toggle UPDATE mode ON when you have a record displayed on the form which you want to update, and leave UPDATE OFF while you are browsing through your records. If SET LOCKWAIT is OFF, then whenever an attempt is made to lock a record that is already locked by another user, you are given the choice of waiting for the lock or continuing in query mode.

When UPDATE is toggled ON, the form is refreshed with the most current information from the table. As only one user at a time can be in UPDATE mode on a particular record, the information displayed on the form is always current at the time of editing. The changed data on the form is written to the table and the lock released when the [EXIT/SAVE], [NEXT SCREEN], [PREVIOUS SCREEN] or [MENUBAR] keys are pressed. If the [ABANDON] key is pressed and changes have been made to the data, SET VERIFY ON causes a dialog box to be displayed asking for confirmation.


Keyword Description
<scope> If no <scope> is specified, CHANGE is activated on the current record and all records are accessible using the [NEXT RECORD] and [PREVIOUS RECORD] keys.
FIELDS <field list> The active fields can be restricted to those specified in the comma separated <field list>.
FOR <condition> Record navigation is restricted to those records that match the <condition>.
KEY <exp> The active records can be restricted to those that match the specified <exp>. The <exp> must be based on the index key of the current master index.
NOAPPEND The ability to append records is disabled.
NOCLEAR Erasing of the screen on entry and exit from CHANGE is disabled.
NODELETE The ability to delete records is disabled.
NOEDIT The ability to edit the record is disabled. Access is read only.
NOFOLLOW The NOFOLLOW key word determines whether the record pointer follows a record whose position has changed. A record's position may change when fields that are part of the master index expression are modified. Normally, upon update, the record pointer will be moved to the new position, NOFOLLOW disables this.
NOINIT The work surface retains the keywords and specifications from the last CHANGE session.
NOMENU The menu bar is disabled in the default CHANGE form.
NOORGANIZE Language compatibility only
NOWAIT Control is returned to the executing program without waiting for the user to exit the CHANGE worksurface.
WHILE <condition> Record navigation is restricted to those records that match the specified <condition>. Navigation cannot continue beyond a record that does not match the <condition>.


Keys

The following keys are active in CHANGE:


Key Action
ABANDON Discard current changes then exit from the form
CURSOR DOWN Skip to next field
CURSOR LEFT Skip to previous field
CURSOR RIGHT Skip to next field
CURSOR UP Skip to previous field
DELETE FIELD Initialize field
DELETE RECORD Delete / Recall the record
EDIT FIELD Enter field edit mode
EXIT/SAVE Write current changes then exit from the form
FIND Find record by key or condition
FIND NEXT Find next record matching specified key or condition
HELP Activate pop-up help
MENUBAR Activate the CHANGE menu bar
NEXT RECORD Write current changes then skip to next record
PREVIOUS RECORD Write current changes then skip to next record
REFRESH Redraw the form
TAB Toggle function key menu on and off
UPDATE MODE Toggle update mode on and off


If SET MOUSE is ON, cursor keys will move the cursor anywhere on the screen rather than just from field to field. If SET NAVIGATE is ON, the cursor moves to fields following the direction specified by the key being pressed, rather than following the order of the GETS on the form. When the RETURN key is pressed, the cursor moves to the nearest field when SET NAVIGATE is ON.

Field edit mode keys

The following keys are active in field edit mode:


Key Action
BACKSPACE Delete character before cursor
CURSOR LEFT Skip to previous character
CURSOR RIGHT Skip to next character
DELETE CHAR Delete character under cursor
DELETE FIELD Delete from cursor to end of field
DELETE WORD Delete current word
INSERT MODE Toggle insert / overwrite mode
WORD LEFT Skip left a word
WORD RIGHT Skip right a word


Menus

The following menu options are available from the CHANGE menu bar in the default form:


Menu Item Action
Descriptions Toggle the field descriptions on and off
Top Position to the top of the table or selected records
Bottom Position to the bottom of the table or selected records
Order Select index order
Query Query the table for selected records
Help Activate on-line help system


Example

use demo
change


Products

Recital