Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

13.4.6 Hidden Field Attribute and the Select Field Attribute

Attributes

Description

*HIDE   *HIDDEN

These attributes are synonyms.

Use of these attributes indicates that the field is to be "hidden" and not displayed on the screen.

This attribute is primarily intended to allow fields to be included into a browse list but not actually displayed on the screen. Refer to the DEF_LIST command for more information about lists and list processing.

*SEL  *SELECT

These attributes are synonyms.

Use of this attribute indicates that a field is to be used to "select" an entry from a list. Fields with this attribute are input capable no matter what the display mode. Refer to the DEF_LIST and SELECTLIST command for more details of lists and list processing.

Examples

The following RDML program uses the *HIDDEN and *SELECT attributes and requests that the user input a generic customer name. All customer names that match are displayed and any of them can be selected for detailed display:

     DEFINE   FIELD(#CHOOSE) TYPE TYPE(*CHAR) LENGTH LENGTH(1) COLHDG COLHDG('Sel')
DEF_LIST NAMEDLIST NAMED(#BROWSE)  FIELDS((#CHOOSE #CHOOSE *SELECT) #NAME (#CUSTNO  #NAME (#CUSTNO *HIDDEN))
GROUP_BY NAMEBY NAME(#CUSTOMER) FIELDS(#CUSTNO #NAME #ADDR1 #ADDR2 #POSTCD)
FIELDS(#CUSTNO #NAME #ADDR1 #ADDR2 #POSTCD)
REQUEST    FIELDS(#NAME)
CLR_LIST   NAMED(#BROWSE)
SELECT  FIELDS(#BROWSE) FROM FROM_FILE(CUSMSTV1) WITH WITH_KEY(#NAME) GENERIC GENERIC(*YES)
ADD_ENTRY  TO_LIST(#BROWSE)
ENDSELECT

DISPLAY    BROWSELIST(#BROWSE)
SELECTLIST NAMED
SELECTLIST NAMED(#BROWSE) GET GET_ENTRYS(*SELECT)
FETCH      FIELDS(#CUSTOMER) FROM FROM_FILE(CUSMST) WITH WITH_KEY(#CUSTNO)
DISPLAY    FIELDS(#CUSTOMER)
ENDSELECT

Some points to note about this RDML program are:

...

          DEFINE    FIELD(#CHOOSE) TYPE(*CHAR) LENGTH(3) COLHDG('Sel')
   DEF_LIST NAMED(#BROWSE) FIELDS((#CHOOSE *SELECT) #ORDER #DATDUE)
   REQUEST   FIELDS(#DATDUE)
   CLR_LIST  NAMED(#BROWSE)
   SELECT    FIELDS(#BROWSE) FROM_FILE(ORDHDRV3) WITH_KEY(#DATDUE)
   ADD_ENTRY TO_LIST(#BROWSE)
   ENDSELECT

   DISPLAY   BROWSELIST(#BROWSE)
    --> SELECTLIST NAMED(#BROWSE) GET_ENTRYS(*SELECT)
   |
   |      CASE       OF_FIELD(#CHOOSE)
   |
   |      WHEN       VALUE_IS('= CUS')
   |                 < display customer details >
   |      WHEN       VALUE_IS('= DET' '= LIN')
   |                 < display line item details >
   |      WHEN       VALUE_IS('= HIS')
   |                 < display customer payment history >
   |      WHEN       VALUE_IS('= STS')
   |                 < display order status >
   |
   |      ENDCASE
    |
         |
    --- ENDSELECT ENDSELECT
  • Note that like the first example the commands request that a "date order due" be input. A list of all associated orders is then built and displayed. When displayed the list would look something like this:

...