QUERY

From Recital Documentation Wiki
Jump to: navigation, search

Purpose

Full screen viewing of records in a table through a form


Syntax

QUERY [<scope>]

[FIELDS <field list>]

[FOR <condition>]

[KEY <exp>]

[NOCLEAR]

[WHILE <condition>]


See Also

@...GET, @...MENU, APPEND, BROWSE, CHANGE, CREATE SCREEN, EDIT, FMT(), INSERT, LABEL, READ, RESTORE SCREEN, SAVE SCREEN, SET FORMAT, SET KEY, SET MOUSE, SET NAVIGATE, SET QUERYMODE, SET UPDATE


Description

The QUERY command provides a read only version of the EDIT and CHANGE commands. Unless the SET FORMAT TO <.fmt filename> command has been issued, QUERY will use the default form. You can design your own forms in the Forms Designer using the command CREATE SCREEN. The Forms Designer will automatically generate a format file that contains @…SAY…GET commands. This form can be used at any time with the database by issuing the SET FORMAT TO command.


Keyword Description
<scope> If no <scope> is specified, QUERY 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.
NOCLEAR Erasing of the screen on entry and exit from QUERY is disabled.
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>.


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.

The following keys are active in QUERY:


Key Action
ABANDON 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
EXIT/SAVE Exit from the form
FIND Specify search key/condition
FIND NEXT Search for next key/condition as specified by FIND
HELP Activate pop-up help menu (field list)
MENUBAR Activate the QUERY menu bar
NEXT RECORD Skip to next record
PREV RECORD Skip to previous record
REFRESH Redraw the form
TAB Toggle key identification menu on and off


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


Menu Item Action
Descriptions Toggle the field descriptions on and off
Top Position to the top of the database
Bottom Position to the bottom of the database
Order Select index file order
Help Activate on-line help system


Example

set format to myscreen
query all for event = "BALLET"


Products

Recital