You are here: Development Standards > Routines > General Routines > GENCHECK_RADIO

# GENCHECK_RADIO

GENCHECK_RADIO is a general routine that contains a multiline function called FNCHECKRADIO(). This function takes a numeric value and a string, and will select a radio button from a provided list, based on the numeric value. GENCHECK_RADIO occupies lines 18850–18890 and should be merged into all programs that need to manipulate radio buttons while in GUI mode.

Variable | Description
PARAM | Numeric value on which to base selection
LIST$ | List of control ID’s of radio buttons, each 5 characters long, with no separator between them

Use radio buttons only on screens where a 1-x selection is offered on character screens. Examples of these would be on report pick screens and transaction entry type selection.

To use GENCHECK_RADIO, add a line in the GUI_DATA section where a numeric value would print in the DATA section of code. For example, if the code in the data block like this:

`7720 PRINT @(22,10),STR(TRANSACTION_TYPE:”#”),`

Its GUI equivalent would be as follows:

`17720 LET TMP=FNCHECK_RADIO(PRINT_DETAIL,”041010410204103”)`

Notice that all radio controls are passed to the function. The function determines which radio button to check based on the value of PRINT_DETAIL.