4.3 Field Description Screen
[ Previous]
| [ Table of Contents ]
| [ Next ]
A blank Field Description screen is shown.
As noted on the screen itself, this is actually the first of two
Field Description screens. However, since none of the second
screens features are needed in this Tutorial , we will not provide
an outline of its contents in this chapter. At this point well note only
that pressing the PREVIOUS key <F2> and NEXT key <F3> allows you to
switch between these two screens. A thorough explanation of the second screen
is given in the C/Base Reference Manual Chapter 6, Advanced Form
Features. Throughout the remainder of this chapter, the term Field
Description screen shall be understood to refer to the first of
these two screens, that is, the screen depicted in the preceding display.
Of the various fields which make up this screen, nearly half are
boolean, and reference may be made to the table contained in the
preceding section if questions arise regarding input within any of these
fields.
The Field Description screen is used to determine the following:
Field Name
The name entered here is usually a data field name from the RMSfile
specified in the Form Description screen. If the In Data File
field is set to yes, and the entry in this field cannot be located in
the data dictionary of the RMSfile specified in the Form Description
screen, then the error message, Cannot find field in dictio nary, is
displayed when you attempt to store the Field Description and the cursor
is repositioned at the beginning of this field awaiting corrected input.
However, if the In Data File field is set to no, then the data
dictionary will not be checked to see if the entry is a valid data
field name. This field should be left blank if the field being
described is a lookup field (i.e., a field in which data from a RMSfile
other than the RMSfile specified on the Form Description form
is being displayed).
Field Length
The length of the field as it is to appear on the form must be entered in
this field. If the field being described is a string field and it is
also a field within a RMSfile, the number of usable characters must be at
least one character less than the length specified in the RMSfile
definition. For example, if the field actually has a ten (10) character
length in the RMSfile, it may be given a maximum Field Length
value of nine (9) in the Field Description screen. As was explained in
the preceding chapter, this is due to the nature of how string fields
are physically stored within RMSfiles.
When an entry is made in the Field Name field, then the field name is
validated, and, if it is the name of a data field within the RMSfile,
its length is looked up, and the value retrieved is entered in the
Field Length field. This value may be changed to make the fields
displayed length shorter than the fields actual length. It cannot,
however, be made longer. If the field is not in the RMSfile specified in
the Form Description screen, then no default length is entered,
and you must enter some appropriate value must be.
Entry Allowed
If this field is set to yes, then the form field is a data entry
field. In a data entry field, data may be entered or updated, provided that
the form is processed with those functions available. An entry field is
displayed in reverse video mode, thus making it obvious to the user. (Note:
Reverse video mode may be displayed in several different ways depending on
the type of terminal being used.) If this field is set to no, however,
data may not be entered, regardless of the availability of certain functions.
A field that is not an entry field is a display field (although
it may be displayed invisibly ). Display fields are used to display
data from either the current RMSfile or some other RMSfile. The contents of
display fields cannot be changed within the form by the user. Display fields
are shown in underline mode on the screen to distinguish them from entry
fields. (Note: Underline mode may be displayed in several different ways
depending on the type of terminal being used.) If nothing is entered in this
field it will be set, by default, to yes.
Input Required
An entry of yes in this field means that the record cannot be stored
until the form field has data entered in it. If the Input Required
field is set to yes, and during data entry this field is blank when
the STORE key <F5> is pressed, then the Input required error
message is displayed and the cursor is repositioned at the beginning of that
field awaiting input.
In Data File
If this field is set to yes, data entered into the form field is placed
in the RMSfile when the record is stored. Afterwards, when the record is
redisplayed, the contents of this data field will be displayed (although it
may be displayed invisibly). If this field is set to no, then
the data in the field will not become a part of the RMSfile record
when the STORE key <F5> is pressed. The In Data File field should
be set to no whenever the form field is used only to display data from
another file or to enter data upon which calculations to be performed within
the form are dependent. (Note: Information regarding the Copy/Calculate
field may be found in C/Base Reference Manual Chapter 6,
Advanced Form Features.)
Invisible
When this field has a value of yes, the form field is not
displayed on the form. An example of this features use would be the
copying of a fields contents from one form to the next where
displaying it a second time would be unnecessary. If no entry is made in this
field, its value is set to no.
Validation File
If the contents of the field are to be checked against another RMSfile for
validation, then the name of that file is specified in this field.
Whenever the value of this field changes, form finds a record in the
Validation File whose primary key matches the new value in this fields, or
displays the error Not Valid if no record is found.. Form saves
the record found in the Validation File for use by subsequent look-up
fields.
Lookup Field
Following the validation process mentioned in the preceding paragraph, fields
from another RMSfile may be displayed. In order to use this feature,
the field name entered must be a valid data field name in the file
named in the Validation File field, and no subsequent
validation processes may have been performed since the one associated with
this fields RMSfile.
When using this feature, the Field Name field should be left
blank.
Validation Form
This is the name of a form within the formfile currently being processed.
This feature is useful when entering data that will be validated. The
operator can access the Validation Form by pressing the GOLD key
<F1> followed by the V key when the cursor is in this field. The
operator can search for the desired data and, once found, the operator can
return to the original form by pressing the GOLD key <F1> followed by
the E key. When this is done, the original form is redisplayed and the
validated data is copied to the form field(s). The cursor automatically moves
to the next entry field on the form.
Initial Value
If a field is to be initialized to a specific value, then that value is
entered in this field. As the data entry form is displayed on the screen, the
field will appear with this as its value.
A typical use of this field would be the display of the current system date
or time within the form, which may be accomplished by entering the lower-case
word today in this field. (Note: The type of value returned by
today will depend upon the data type of the form field.) Environment
string names may also be entered in this field, preceded by a dollar sign
($), thus allowing you to bring these values automatically
into the form.
Default Value
The default value assigned to a form field is entered here. A particular
value may be specified, or the lower-case word today may again be used
in order to have the current system date or time entered in a field. The
value entered in this field is copied into the form field when the field is
empty and either the RETURN key is pressed to exit the field or the STORE key
<F5> is pressed to store the contents of the form. However, if the
Invisible field is set to yes, the value entered in this
field will not be generated.
Format field
An entry of a legal format string will allow formatting of display fields.
See C/Base Reference Manual Chapter 13, Formatting Data Values
and C/Base Reference Manual Chapter 6, Advanced Form Features
for more information on format strings and how to use them in forms.
Copy from previous field
An entry of yes in this field causes the value of a field in a
previous form (within the formfile currently being processed) to be copied
into this form field, as long as the current forms field has the
same name as the field in the previous form. If no entry is made in
this field, its value is set to no.