HP 3000 Manuals

Task 3 - Specifying Screen Field Details [ HP ALLBASE/4GL Developer Self-Paced Training Guide ] MPE/iX 5.0 Documentation


HP ALLBASE/4GL Developer Self-Paced Training Guide

Task 3 - Specifying Screen Field Details 

After you have created the image of a data screen with the screen
painter, you usually need to specify some further details for the data
fields on the screen.

These details include automatic data movement, field-associated
functions, and some special field processing indicators.  For two fields
on your data screen, some default values will already be created based on
the field specification you used to define the field.  In most of
these cases you will only need to add the automatic data movement
specifications.

Menu Path 

To access the screen field details screen from the main 
menu: 

   1.  Select the Screens option.

   2.  Choose Details.

Screen Description 

This screen allows you to complete the definition of each input or
display field on an application data screen.

	       Click here to view figure.
          Screen Field Details Screen 

First you must enter the name of the screen, and then step through the
fields on the application data screen completing their respective
details.

The complete screen field details screen is used for each field on your
application screen.

To enter the field values: 

      Field                 Entry                           Explanation 

---------------------------------------------------------------------------------------

Screen            product_scrn              The name of the data screen that you are
                                            defining field details for.

          Table 3-0.  (cont.) 

      Field                 Entry                           Explanation 

---------------------------------------------------------------------------------------

Sequence Number   Accept the default.       The field number, defined by the sequence
                                            of data fields on your data screen.

                                            The field sequence for this screen is set
                                            automatically from top left to bottom
                                            right.  This sequence of fields and
                                            allocation of field numbers is determined
                                            by the Automatic Numbering flag on the
                                            screen header screen.

                                            When you press the Return key, the details
                                            already recorded for this field are
                                            displayed at the bottom of the screen.  The
                                            dictionary specification details have been
                                            automatically transferred to this screen,
                                            and many of the fields contain a default
                                            value.

Field Spec.  Name Accept the default.       This field defaults to the dictionary field
                                            specification name used to define the
                                            attributes of this screen field in the
                                            screen painter.

                                            Blanking out this field changes the last
                                            nine fields on the field details screen to
                                            input fields.  These fields cannot be
                                            changed when a link to the dictionary
                                            exists through a field specification name.
                                            If you have blanked out the field
                                            specification name, re-enter the name
                                            product_no to protect the screen field
                                            specification again.

Primary           F-product_no.product      This entry specifies that when the cursor
                                            is moved to this screen field, the current
                                            contents of the field product_no from the
                                            file buffer product are moved to the screen
                                            buffer and then displayed.

                                            On completion of data entry, the new
                                            contents of the screen field are moved to
                                            the file buffer.  (Refer to "Entry Notes"
                                            section in this lesson.)

To enter behavioral characteristics fields: 

The next six fields define the way the field behaves on the screen.
This is not dependent upon any data type, format, or validation
specifications.

        Field                 Entry                         Explanation 

---------------------------------------------------------------------------------------

Input/Display         Accept the default.   This indicates whether this data field is
                                            an input field (I), or a display field (D).
                                            It enables you to override the setting you
                                            specified in the screen painter.

Required Field        Accept the default.   Indicates whether this field must be
                                            non-blank for alphanumeric, or non-zero for
                                            numeric fields, for the field value to be
                                            accepted.

                                            When the user attempts to move off a
                                            required field that has been left blank,
                                            the field is highlighted and the cursor
                                            remains on it.  The user can move back to a
                                            field with a lower sequence number, or
                                            enter data into the current field.  The
                                            user cannot commit the screen with the  
                                            Commit Data  function key while a required
                                            field remains blank.

Help Name             Accept the default.   This is the name of the help screen that is
                                            called if the user presses the  Help  
                                            function key while the cursor is on this
                                            field.

                                            If you have defined a help screen name for
                                            this field specification in the dictionary,
                                            that name is automatically transferred to
                                            this field.  If you haven't specified a
                                            help screen name, HP ALLBASE/4GL creates a
                                            default help screen name with the same name
                                            as the field.  You can change the help
                                            screen name here without affecting the
                                            dictionary specification.

          Table 3-0.  (cont.) 

        Field                 Entry                         Explanation 
---------------------------------------------------------------------------------------

Clear on COMMIT       Accept the default.   This field works in conjunction with the
                                            Clear Fields on COMMIT setting specified on
                                            the screen header for this screen.  The
                                            relationship is an OR relationship.  That
                                            is, if the setting for either is Y, the
                                            field is cleared.  Only if both are set to
                                            N will the field not be cleared.

Include in SHOW       Accept the default.   This specifies whether the field should be
                                            manipulated when it is referred to from a
                                            logic block SHOW command.  With some
                                            fields, you may want to ensure that the
                                            only time anything is ever done to them is
                                            when an explicit reference is made to them.

                                            The SHOW command is used in HP ALLBASE/4GL
                                            logic to redisplay data in a screen field.
                                            You will learn about the SHOW command in a
                                            later lesson.

Automatic Flow to     Accept the default.   So far, all the fields that you have used
Next                                        require you to press the Return key to
                                            signal that the field entry is complete.
                                            In the same way, the fields you define for
                                            an application screen normally require the
                                            user to press the Return key to complete a
                                            field entry.  Under some operating systems,
                                            setting the Auto Flow to Next field to Y
                                            causes HP ALLBASE/4GL to generate an
                                            implicit Return when the user fills the
                                            field.  Although displayed on this screen,
                                            that facility is not available under the
                                            MPE/iX operating system.

To enter function specification fields: 

You can associate a logic function with each screen field.  The next four
fields specify how the function for this field is executed.  This
function enables you to perform some data manipulation or validation when
data is displayed in the field, or entered into the field.

The field function you are naming here will read the product file for a
record with a key value matching the value entered by the user.

        Field                 Entry                         Explanation 

---------------------------------------------------------------------------------------

Function              product_key_read      This is the name of the function to be
                                            associated with this field.  If you leave
                                            this field blank, entry into the next three
                                            fields is not possible.

Prior/After/Both      A                     This entry specifies when the function is
                                            executed.

                                            There are three available options.  P 
                                            indicates that the function is executed
                                            prior to data entry, when the user moves
                                            the cursor onto the field.  A indicates
                                            that the function is executed after the
                                            completion of data entry for the field;
                                            this is only valid for input fields.  B 
                                            indicates that the function is executed
                                            both prior to and after data entry.

          Table 3-0.  (cont.) 

        Field                 Entry                         Explanation 

---------------------------------------------------------------------------------------

Perform Function on   Accept the default.   This field relates to the behavior of the
SHOW                                        field under a SHOW command from a logic
                                            block.

                                            At times the function may perform some data
                                            formatting or extraction that is essential
                                            for the correct data to be displayed.  In
                                            this case, the function needs to be
                                            executed when the field is displayed under
                                            control of a SHOW command.

After Function if     Accept the default.   This field only applies to non-required
Blank                                       screen fields.  It indicates whether the
                                            function is executed even if the screen
                                            field has been left blank.

                                            You may have noticed that only one function
                                            can be called from the field, yet the
                                            function can be called at three distinctly
                                            different times; prior, after, or on SHOW.
                                            HP ALLBASE/4GL has two switches (*ENTERED
                                            and *SHOWING) that you can test in the
                                            function to determine when the function is
                                            being executed.  This allows you to use the
                                            one function to perform three different
                                            operations, depending on the processing
                                            stage at which the function is executed.

To enter validation and format specification fields: 

The bottom nine fields on the screen are a copy of the same fields from
the dictionary field specification screen.

If you have entered a field specification name in the Field Spec.  Name 
field at the top of this screen, you cannot change any of this group of
fields.  You can only enter local field definitions if there is no field
specification name associated with the application screen field.

The fields are not described here as they have exactly the same meaning
as their counterparts in the field specification screen.

To complete the Product Number screen: 

   1.  Once you have completed all of the details for this particular
       screen field, press the  Commit Data  function key.

       When you press this key, the cursor returns to the Sequence Number 
       field.

       The details for the next field on the application screen are then
       displayed, enabling you to enter the remaining details.

As you go through the screen fields, HP ALLBASE/4GL creates a primary
data movement identifier automatically.  This data movement identifier
consists of the field specification name for the current field and the
file record specified for the first field on the screen.

To complete the remaining screen field details: 

Now you are ready to complete the screen field details for the rest of
the training screen.

   *   Enter the details listed.  Only those fields that require an entry
       other than the default are listed here.

   *   After entering the details for each field, press the  Commit Data  
       function key.

   *   If you make an error in a particular field of the screen, you can
       display its details by entering its sequence number and pressing
       the Return key.

       The field details are then displayed so you can modify them, and
       commit them again.

The following entries are required to complete the screen field details.

Description 

Sequence Number           2

Primary                   F-description.product

Supplier Number 

Sequence Number           3

Field Spec.  Name         supplier_no

Primary                   F-supplier_no.product

When you defined the supplier number field in the screen painter, you
didn't use the dictionary field specification name method.  For this
reason, a default name is not displayed with the rest of the field
details.  When you enter the name supplier_no, the fields at the base of
the screen become display fields.

Lead Time 

Sequence Number           4

Field Spec.  Name         lead_time

Primary                   F-lead_time.product

Required Field            N

As with the previous field, you didn't use the dictionary field
specification name method to define this field in the screen painter;
therefore, no default name was displayed.

You have now completed the definition of the fields for this screen.  As
with a record layout, you must generate the screen before it can be used.
The "Entry Notes" section that follows provides additional information
for some of the fields.  If you wish, skip this section and continue on
to "Task 4 - Generating the Data Screen."

Entry Notes 

Data Movement 

The Primary, Default and Other fields define the automatic data movement
that occurs as the user moves through the fields on the application
screen.  The three types of data movement are:

Primary             When HP ALLBASE/4GL displays a screen field, it moves
                    the contents of the primary data movement field to
                    the screen and displays the field contents.  For an
                    input field, HP ALLBASE/4GL moves the contents of the
                    screen field to the primary data movement field after
                    the user completes data entry for the screen field.

Default             If the screen field is blank, HP ALLBASE/4GL moves
                    the contents of the default field to the screen and
                    then displays its contents.  If the screen field is
                    not blank, no action takes place.

Other               For input fields, HP ALLBASE/4GL moves the contents
                    of the screen field to the other data movement fields
                    when the user completes data entry for the field.
                    Each input field can have up to three other data
                    movement fields.


NOTE You cannot specify both a primary and a default data movement field. They are mutually exclusive. A field can only have one source for its data, however, you can combine either of these "source" movement fields with up to three Other data movement specifiers.
The fields you name in these automatic movement specifiers can be any of the following: * A file record field reference. * A screen field reference. * A scratch-pad field reference. * A variable. * A numeric or alphanumeric constant (default data movement field only).
NOTE The file record field specifier consists of three components. The prefix F- indicates that this is a file buffer field reference. Next, the field name product_no indicates the field to be used, and the file name product specifies the file buffer to be used. These last two terms are separated by a single period (. ). Refer to the HP ALLBASE/4GL Developer Reference Manual for further information on naming and referencing rules.
As the Primary and Default move specifiers are mutually exclusive (you can only move data into the screen field from one of these sources), HP ALLBASE/4GL skips over the Default move field. If you wanted to alter this field, you would need to delete the Primary move specifier, and then specify the Default move field. No Other move fields are to be entered in this example. When you leave the first Other move field blank, HP ALLBASE/4GL skips over the next two.


MPE/iX 5.0 Documentation