SFLSNGCHC (Subfile Single Choice Selection List) keyword for display files

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

The format of this keyword is:
SFLSNGCHC[([*NORSTCSR | *RSTCSR] [*NOSLTIND | *SLTIND]
[*NOAUTOSLT | *AUTOSLT | *AUTOSLTENH])]

Parameters are optional and can be entered in any order.

The *RSTCSR parameter specifies whether the arrow keys should be allowed to move the selection cursor outside of the field. *RSTCSR specifies that the arrow keys will not cause the selection cursor to move outside of the selection list field. *NORSTCSR specifies that the arrow keys will cause the selection cursor to leave the field. If the SFLSNGCHC 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 radio buttons should be used on graphical color displays as selection indicator. *NOSLTIND specifies that no selection indicator should be used on a graphical color display and only a selection cursor can be used to make a selection. The default is *NOSLTIND.

The *AUTOSLT parameter indicates if the ENTER key should automatically select the choice currently being indicated by the selection cursor. *NOAUTOSLT indicates that the user must select the choice. *AUTOSLTENH indicates that auto-select is only in effect if the device is connected to an enhanced controller. If the SFLSNGCHC subfile control record is defined in a pulldown, the default is *AUTOSLT. Otherwise, the default is *NOAUTOSLT.

A subfile containing the SFLSNGCHC keyword must:
  • Contain only one output field
  • Cannot contain input capable fields
  • Can 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 SFLSNGCHC keyword:

SFLDROP
SFLFOLD
SFLMLTCHC

 

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 item. 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 SFLSNGCHC 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                                      SFLSNGCHC
     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 One Item:'

In this example, when using a graphical display station attached to a controller that supports an enhanced interface for nonprogrammable workstations, a single-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. A selected item is 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. See the description of these keywords in this topic collection for examples of setting display attributes.

|...+....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                                      SFLSNGCHC
     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 One Item:'