SET FORMAT

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Select a screen format for full screen forms based operations


Syntax

SET FORMAT TO [<.fmt filename> | (<expC>) ]


See Also

@...GET, APPEND, CHANGE, CREATE SCREEN, EDIT, FMT(), INSERT, MODIFY SCREEN, QUERY, READ, RESTORE SCREEN, SAVE SCREEN, SET AUTOFORMAT, SET DESCRIPTIONS, SET DEVICE, SET POSTFORM, SET PREFORM, SET READINSERT, SET VIEW


Description

The SET FORMAT TO <.fmt filename> command selects a screen format which will be used with the full screen forms based commands: APPEND, CHANGE, EDIT, INSERT, QUERY and READ. The filename can be substituted with a <expC>, enclosed in round brackets, which returns a valid filename. If no file extension is specified, ’.fmt’ is used. If the SET FORMAT TO command is issued without a <.fmt filename>, the current format file is deselected. The @ and SET commands are processed from the screen format file, other commands are ignored. The validity of the @ commands contained in the screen file is not checked until the form is activated with one of the full screen forms based commands.

The Screen Painter, initiated with the CREATE SCREEN command, automatically generates screen format files. Each workarea can have a separate format file specified. If no format file has been specified, and a full-screen forms-based command is executed, then a default form is generated.

The READ command does not handle user-defined forms in the same manner as the other forms based commands. The READ command executes the 4GL statement in the format (.fmt) file as if they were executed as part of a program module. The @...GETs can be exited by pressing [ENTER] on the last field only if SET READINSERT is ON and the last GET field is not a memo data type. Form level triggers are only executed once when the READ command is used to activate the form. Behavior of the READ command is not affected by the SET READEXIT command when used in conjunction with SET FORMAT and READ.

Note: Format files can be nested. Whenever a menu bar is activated from a format file, the current state of the form is saved. The FMT() function can be used to save the name of the current format, another can then be opened, and afterwards the original can be reopened.


Example

use demo
set format to demo

Products

Recital