|
Forms | Using Forms |
See Running SirForms for details.
Database Password
Read Security
Write Security
Prefix
All of these parameters can be specified on the execution statement or can be entered in response to prompts. If a particular prompt does not apply, simply skip it.
SirForms commands cyan be entered in one of three ways:
F1
are 'mapped' to specific commands; i.e. pressing the key performs the command. You can alter this mapping to suit
your own style of working.
The standard use of Shift-F1
is to display "key help". This is a list of keys mapped to functions. While this is displayed, you can update the mapping by using the menus on the screen. The mapping for SirForms defaults to SirForms.kmp. If this file does not exist, when you start SirForms for the very first time, you are prompted to set up
some essential key maps. Whenever a specific key is mentioned in this documentation it assumes that no re-mapping has been done.
Ctrl-Enter
(Command function key)
or entering an = (equals sign)
as the first and only character of a field. If the field is long enough then a command
can be entered in the field by preceding it with an = (eg =WRITE
).
Enter
. The
command is executed leaving the field unchanged with the original value
restored.
F1
or go to the command line and type HELP
.
SirForms uses the same Help as the rest of SIR/XS and brings up the specified HTML browser.
EXIT
. Alternatively use Shift-Esc(Stop)
or
Esc (Cancel)
repeatedly to return through any previous screens to
the root screen and then to end the forms session.
FIND
or SEARCH,
VERIFY
or NOVERIFY
and EDIT
or
NOEDIT
. The default is FIND, NOVERIFY,
EDIT
, though these may be different in a particular form.
F | S
Find
mode
or Search
mode.
Find
mode means you are finding a set of records directly by giving high level keys
and is the default. You can create, update or delete records in
Find
mode. Search
mode means you are
searching for sets of records based on values. In Search
mode you can use both key and non-key data to locate records, specifying the
information to search by. When a record is retrieved, it can be updated or
deleted. You cannot create new records in Search
mode.
V
Verify
mode. Verify
is used to validate
existing data. It is used in conjunction with either Find
or
Search
mode. In Verify
mode, you re-enter
data and SirForms checks it against the data already stored. This means you are
re-keying existing data to check the accuracy of data entry (known as double key
verification).
E | N
E
means the screen is in Edit
mode and that in-line editing is enabled. This is the default.
N
means the screen is in Noedit
mode and
you must rekey the whole of any field to change data within it.Screen:
displays the name of the screen, and, if
applicable, the page number and number of pages for the screen.
Cir/Rec:
contains information about the case and record data
being displayed. Init
appears when the screen is in
Find
mode and is waiting for keys to be specified.
Search Init
appears when the screen is in Search
mode and is waiting for a search specification. When a record or row has been
retrieved, the two fields in parentheses show the type of lock and record
status. These are primarily of interest when multiple people may be accessing
records in concurrent mode. If you are using SirForms in concurrent mode, see
Master.
To enter data into a field, type in the data. When you have finished, press
The Top of Page key goes to the first data field
on this screen.
The
A Menu is like a table of contents that tells you what other
screens you can select. Page Down or a response of "Y" at the appropriate prompt,
goes to that screen.
This is known as "calling" a screen. Page Up or Esc returns to the calling
screen. Another screen may be called from the lower level screen and screens
may be nested as deeply as necessary.
Certain screens may be defined as Stop screens.
The
Enter the data fields. If the data for a field is invalid, an error message is
displayed on the status line and the cursor returns to the beginning of that
field for another entry.
The Write key or command writes the data to the database and clears all
the fields. To write the data and leave the data on the screen, use
If you issue a command to move away from a screen where data has been modified,
SirForms may ask whether to write this record. (When a form is created, it can
specify that data is automatically written when you leave the screen.)
Reply "OK" or "Y" to write the data.
If you omit a key field, the first record that matches whatever
keys are entered is retrieved. If all key fields are blank, the first record in the database
is retrieved.
There are function keys and commands to browse through sets of records.
First
retrieves the first record; Last retrieves the last record; Next and
Previous go through the set of records one at a time in the specified
direction. If no more records are available in the set, a message is displayed
that the end of file has been reached.
If the screen has been specified to write records automatically, it is possible
to create new records erroneously. If a record key (all the key fields) is
entered which is not on the database, a new record is created.
When you move away from the screen or restart, that record is written
automatically. Use the
To mark a key field, position the cursor to the keyfield and use the
For Example: Use the Employee record and suppose 46 exists, but 45 does
not. First mark the Identification Number and enter 45. Note that Employee 46
is displayed and that you can use
Now do not mark Identification Number and enter 45. Note that a new employee,
45, is created and if you use
To set the search specifications, set Search Mode with the
If there are no more records that match the search pattern, a
message is displayed. Terminate the search with
The search specifications in individual fields are used to search for records
with values which match all of the specified values.
The
WHERE (SALARY GT 3000)
The
The hash sign (#) represents the field where the cursor was positioned when you
went to the command line. For example, to search for female employees, position
the cursor at the field GENDER and then go to the command line and enter
WHERE (# = 2)
The wildcard symbol can appear more than once in the field. For example, %ABC%,
finds names that contain ABC anywhere in the name.
Patterns can be used in a
Note that the pattern matching symbols used in where are not the same as the wildcards
used in field.
The pattern matching features of the
To stop using
This is a text representation of the screen not a graphic. If you wish to save a
"picture" of a screen, use your normal screen save process. (eg Alt PrtSc in Windows).
To use the command symbols, enter the single character
command (which clears the field) and press Status:
is where messages are displayed.
Entering Data
Each data field on the screen has a prompt or description of the information and
a data area to enter or to display the data. When a screen is initially
displayed, fields may already have data in them or the fields may be waiting for
data to be entered. Each data area that is waiting for data is filled with a
character that indicate the number of characters in
the field (periods ..... by default).Enter
.
To skip over fields, use
the Up Arrow
and Down Arrow
keys. Up Arrow
goes back a field, Down Arrow
goes forward a field. Pressing
Enter
without typing in any data, also skips forward over a
field.Field Editing Operations
When you are positioned to a data entry field, you may edit the contents of the
field. Left Arrow
and Right Arrow
position the
cursor within the field and Enter
terminates data entry and
moves to the next field. For the specific keys to use for the other field
editing functions listed below, use Shift-F1
(key help).
The following field editing functions are supported:Insert/Overstrike
Delete Character
Un-delete Character
Delete Field
Clear the whole entry in the field with the
(DelField)
key. Cursor is left in the field.Un-delete Field
Restore a cleared field with the
(UndelField)
key.Store Blank
Store a blank in a field. Equivalent to entering a single space bar
character in the field. Cursor is advanced to the next field.
Store Undefined
Stores a system undefined value in the field. Cursor is advanced to
the next field.
Long Character Fields
Character (string) fields, may be longer than the display space on the screen.
These fields scroll left and right as you type or as you use the left and right
arrows.
No Data
If you move past a field with Down Arrow
, or do not type
anything and just press Enter
, the data remains unaltered. If
nothing is entered on a new record, the field is set to Undefined (the System
Missing Value). If you enter blanks or edit a field and end up with blanks,
this is different from Undefined and may be a valid missing
value.
(DelField)
makes a
field Undefined; (BlankField)
stores blanks in a field
Field Help
For information about a field or about a field error message, use the
Alt-F1 (Default Field Help)
key.
SirForms displays information about the field from the data
dictionary. This includes the name of the field, its input format, its data
type, the range of acceptable values, what its legal missing values are and what
the codes mean. After reading the help information, return to the Record screen
by pressing Enter
. There is also the Ctrl-F1 Custom Field Help
key.
The information may
appear in the status line at the bottom of the screen or it may appear on a
separate screen. If there is no custom help screen or status line message, the
same default help is displayed. Flow of Control
The normal flow of control is from one field to the next field. This may happen
automatically when a field has been completely entered (known as Autotab) or you
may have to press Enter
to move to the next
field. Up Arrow
moves to the previous field,
Down Arrow
and Enter
move to the next field.
Fields may be organised in Groups.
The Next Group key goes to the first field in the
next group;
the Previous Group key goes to the first field in the previous group;
the Top of Group key goes to the first field in this group.Ctrl-R Restart
key
clears the whole screen to enter new key field values.Moving from Screen to Screen
A form usually consists of multiple screens. The data for one record may not
fit on a single screen and may be split into Pages.
If a screen is on multiple pages,
the Page Down - Next page
key moves to the next page;
the Page Up - Previous page
key moves to the previous page.
When you move
past the last field on a page, the next page is usually displayed automatically
(this can be set by the screen designer). Similarly, if you move back past the
first field on the second or subsequent page, the previous page is displayed.
Screens for different records are linked together through menus or under program
control.Shift-Esc Stop
key returns to a higher level stop screen.
This avoids going back through each level of called screen in a hierarchy of
screens. (The very first screen is always a stop screen.) Accessing Records and Rows
Key fields identify the record or row and are usually grouped at the top of the
screen. The key fields are the first fields entered. When you enter a key for
an existing record, the data for that is displayed. If you enter a key which
does not exist, a new record is created.Creating New Records
To create a new record or row, enter all the key fields. After the last key, a
message that a new record has been created is displayed and the cursor moves to
the first data field.Up Arrow
to move to the key portion of the screen. This allows you
to enter a new key value and use the existing fields as a starting place for the
new record.Locating or Updating a Specific Record
To locate a specific record, enter data in all the key fields. The matching record is then retrieved.
If no record in the database matches the key,
a message that a new record has been accessed is displayed.
The Restart key or command redisplays the screen
without creating a new record.Updating a Record
Once a record is displayed, you can modify the data fields. The CANCEL
command
restores the original data "undoing" whatever changes were made. When you have
finished updating the record, RESTART
,
WRITE
, or moving away from the screen, writes the changed
data.Deleting Records
Once a record is displayed, the DELETE
command marks it for
deletion. The record is deleted when you RESTART
or
WRITE
the screen or you move away from the screen. To nullify
the deletion, use UNDELETE
before taking one of these actions.DELETE
command to flag the record for
deletion in this instance.Marking A Key Level
When going through records using NEXT
and
PREVIOUS
, SirForms is controlling the set of records to access.
If the top level key or partial key is entered, FORMS automatically restricts
the set to records defined by that key. MARK
allows you to go
outside of this range. This is particularly useful when you do not know an
exact key, but know roughly the value to start at. Mark a key field and enter a
key value; this positions to that record or the first record with a higher key
if that key does not exist. If key fields have not been Marked, a
new record is created for keys which do not exist.(Mark)
key. Forms responds with the message A "key level
tagged". Then enter the start key value. To enter a different start key,
mark the key again.(Next)
and
(Prev)
to browse forwards or backwards from that point.(Next)
or
(Prev)
an error message 152 A "Command is not legal at
current time" is issued. Search Mode
Search mode locates records based on search specifications. These can consist
both of key and non-key data. You cannot create new records in Search mode.SEARCH
command at the command line. This
displays a screen with all fields blank. Then enter values in the fields to be
searched. When you have finished entering the search specification, use
FIRST, NEXT, PREVIOUS
or LAST
to retrieve
matching records. While searching for a record to match the search
specification, you may see a ".....searching" message displayed on the
Status line.RESTART
.WHERE
command defines search
specifications that include logical conditions such as an OR
condition, a NOT
condition or tests for greater than or less
than. For example, to search for employees who earn more than $3000;WHERE
command can be used in addition to individual field
specifications. Only one WHERE
clause is active at one time.
Enclose the conditions on the WHERE
in parentheses.Search Patterns
Values specified in fields are matched to be equal. To match on part of a
field, use the percent sign (%) as a "wildcard" or A "match anything"
symbol. For example, to retrieve the records for anyone with a last name ending
in FORD, enter %FORD in the name field. String searches are case sensitive.WHERE ... LIKE
command. For
example, to search for all the people whose names start with Fred:WHERE (NAME LIKE '%Fred?')
Enclose the pattern including any symbols in single quotes. A pattern
can consist of any character plus the following symbols:?
any character
%
beginning of line
$
end of line
[...]
list of characters (i.e.,any of these characters)
[!...]
negated list of characters (i.e., all but these characters)
*
zero or more occurrences of the previous character or list
+
one or more occurrences of the previous character or list
To specify a list of characters, specify either single characters or ranges of
characters separated by a dash. The list must be enclosed in square brackets {
[ ] }. Any character in the brackets is treated as the literal character not
as the symbol.WHERE ... LIKE
clause are
extensive and are identical to those of SQL
pattern matching. Verify Mode
Verify
mode is used to validate existing data.
Verify
mode is set with the VERIFY
command
at the command line. When in Verify
mode, use the normal
Find or Search mode techniques to retrieve records. When a record or row is
located, the response area of each field is filled with the letter "V".
To verify the row or record, enter values into the data fields. These are checked to
see if the data that you have entered matches the data that was previously
entered in that field. If it does, the cursor moves to the next data field. If
the value does not match the data in the field, an error message is issued, and
the previously entered data is displayed in the field. If the original entry is
incorrect, modify it, press Enter
, and continue processing.Verify
mode, use the NOVERIFY
command at the command line. Printing Screens
You can copy a screen to a file for later printing. The copy can contain the
complete screen, just the data or just the screen without the data.
The output file must be specified when you launch SIR FORMS;
use the "Print=filename
" parameter on the execution statement.
To print a screen, use
the PRINT
command or key. PRINT LABELS
leaves off the data; PRINT DATA
leaves off the labels. Keys and Commands
The following is a list of SirForms actions
with function keys, symbols (one special character typed in a field) and
commands. Some actions can only be performed by entering the command
(e.g. SEARCH), and some can only be done with keys (e.g. delete a character).
Enter
. The
command is executed leaving the field unchanged with the original value
restored.
Key | Sym. | Command | Action |
---|---|---|---|
Shift-F1 | Get help on keys | ||
Esc | < | RETURN | Go back a screen |
Shift-Esc | . | STOP | Go back to stop screen |
Left Arrow | Moves left in a field for editing. Returns to a previous screen at a CALL prompt | ||
Right Arrow | Moves right in a field for editing. Moves to chosen screen at a CALL prompt | ||
Down Arrow | Moves past a field | ||
Up Arrow | Moves back a field | ||
Del | Deletes the character at the cursor position. | ||
Bksp | Deletes the character before the cursor position | ||
shift-Del | Delete the field | ||
ctrl-Z | Restore the previously deleted field | ||
ctrl-U | Make a field Undefined | ||
ctrl-B | Make a field blank | ||
ctrl-F1 | ? | Get help on a field | |
Alt-F1 | ! | Get dictionary help on a field | |
Pg Dn | > | Call Screen or Page Down | |
Shift-Enter | = | Go to Command Line | |
Ctrl-M | @ | Mark a key level | |
Ctrl-Left Arrow | ( | FIRST | Retrieve first record or row |
Ctrl-Right Arrow | ) | LAST | Retrieve last record or row |
Shift-Right Arrow | ] | NEXT [n] | Retrieve next record or row. [Skip forward n.] |
Shift-Left Arrow | [ | PREVIOUS [n] | Retrieve previous record or row. [Skip back n.] |
Ctrl-R | * | RESTART | Clears the current screen to specify new keys to retrieve. |
^ | TOP | Moves cursor to first field on page | |
CANCEL | Restores original data. | ||
DELETE | Marks record or row for deletion. | ||
DFIRST | Deletes current and retrieves first. | ||
DLAST | Deletes current and retrieves last. | ||
DNEXT n | Deletes current and retrieves next. | ||
DPREVIOUS n | Deletes current and retrieves previous. | ||
DRESTART | Deletes current and restarts screen. | ||
DRETURN | Deletes current and returns to calling screen. | ||
EXIT | Finishes SirForms session. | ||
FIND | Sets Find on. | ||
NOVERIFY | Turns Verify off. | ||
PAGE n | Moves to a page. | ||
Prints screen. DATA prints data only. LABEL prints labels only. | |||
SEARCH | Sets search mode. | ||
STATUS | Displays status. | ||
UNDELETE | Removes delete flag from current record or row if it is marked for deletion. | ||
UPDATE | Writes record and positions to first field on record | ||
WHERE | Sets a search condition. | ||
# | WRITE | Writes record and clears screen. |