SFLMLTCHC (Subfile Multiple Choice Selection List) keyword for display files

Use this record-level keyword to define a subfile as a multiple-choice-selection list. A multiple-choice-selection list is a scrollable group of items from which the user can select multiple items.

The format of this keyword is:
SFLMLTCHC[(&number-selected] [*NORSTCSR | *RSTCSR]
[*NOSLTIND | *SLTIND])]

Parameters are optional and can be entered in any order.

The &number-selected parameter allows the application to find the number of items that were selected in the multiple-selection list. This parameter must name a hidden field with a length of 4, data type of Y, and zero decimal positions.

The *RSTCSR parameter specifies whether the arrow keys should be allowed to move the selection cursor outside of the selection list. *RSTCSR specifies that the arrow keys will not cause the selection cursor to move outside of the push button field. *NORSTCSR specifies that the arrow keys will cause the selection cursor to leave the field. If the SFLMLTCHC subfile control record is defined in a pulldown, the default is *RSTCSR. Otherwise, the default is *NORSTCSR.

The *SLTIND parameter specifies whether selection indicators are used when this selection list is displayed on a graphical display. *SLTIND specifies that the check boxes should be used on color graphical displays as selection indicator. *NOSLTIND specifies that no selection indicator should be used on a color graphical display and only a selection cursor can be used to make a selection. The default is *NOSLTIND.

A subfile containing the SFLMLTCHC keyword must:
  • Contain only one output field
  • Cannot contain input capable fields
  • Might contain hidden fields

This optional keyword is valid only for the subfile control record format.

The following subfile control record keywords cannot be specified on a record with the SFLMLTCHC keyword:

SFLDROP
SFLFOLD
SFLSNGCHC

 

The CHCAVAIL, CHCSLT, and CHCUNAVAIL keywords can be used to indicate the color of the items within the selection list, when the list is displayed on a color display station. The CHCAVAIL keyword indicates the color of the items within the list which are available for selection. The CHCSLT keyword indicates the color of the selected items. The CHCUNAVAIL keyword indicates the items on the list which are not available for selection. These keywords can be used in a subfile control record only if SFLSNGCHC or SFLMLTCHC keywords are also used.

Option indicators are not valid for this keyword.

Example 1

The following example shows how to specify the SFLMLTCHC keyword:

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A
     A          R SFLRCD                    SFL
     A            CTLFLD         1Y 0H      SFLCHCCTL
     A            F1            10A  O  6 10
     A          R SFLCTLRCD                 SFLCTL(SFLRCD)
     A                                      SFLMLTCHC
     A                                      SFLPAG(5) SFLSIZ(&SFLSIZ);
     A                                      SFLDSP SFLDSPCTL
     A                                      ROLLUP(10)
     A   10                                 SFLEND(*SCRBAR)
     A            F3             5S 0H      SFLSCROLL
     A            F2             4S 0H      SFLRCDNBR(CURSOR *TOP)
     A            SFLSIZ         5S 0P
     A                                  1 30'Panel Title'
     A                                  4  5'Select Multiple Items:'

In this example, when using a graphical display station attached to a controller that supports an enhanced interface for nonprogrammable workstations, a multiple-choice list looks like this:


A
figure of the example specification displayed on a graphical display station.

Example 2

The following example shows how to specify what color the items on the list should have on a color display. Available items are displayed in red. Selected items are displayed in blue. Unavailable items are displayed in yellow. The CHCAVAIL, CHCSLT, and CHCUNAVAIL keywords can also be used to set the display attributes of the items on the list.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
     A
     A          R SFLRCD                    SFL
     A            CTLFLD         1Y 0H      SFLCHCCTL
     A            F1            10A  O  6 10
     A          R SFLCTLRCD                 SFLCTL(SFLRCD)
     A                                      SFLMLTCHC
     A                                      SFLPAG(5) SFLSIZ(&SFLSIZ);
     A                                      SFLDSP SFLDSPCTL
     A                                      ROLLUP(10)
     A                                      CHCAVAIL((*COLOR RED))
     A                                      CHCSLT((*COLOR BLU))
     A                                      CHCUNAVAIL((*COLOR YLW))
     A   10                                 SFLEND(*SCRBAR)
     A            F3             5S 0H      SFLSCROLL
     A            F2             4S 0H      SFLRCDNBR(CURSOR *TOP)
     A            SFLSIZ         5S 0P
     A                                  1 30'Panel Title'
     A                                  4  5'Select Multiple Items:'
Related reference
CHCAVAIL (Choice Color/Display Attribute when Available) keyword for display files
CHCSLT (Choice Color/Display Attribute when Selected) keyword for display files
CHCUNAVAIL (Choice Color/Display Attribute when Unavailable) keyword for display files