INITIALIZER attribute

The INITIALIZER attribute allows you to specify an initialization function that will be automatically called by the runtime system to set up the form item.

Syntax

INITIALIZER = [module.]function
  1. module is the name of the module implementing the function. If no module is specified, the function must be defined in a module that is already loaded by the runtime system. If a module is specified, it will be automatically loaded on demand. Module name is case sensitive.
  2. function is an identifier defining the program function to be called to initialize the combobox item list. Function name is case insensitive.

Usage

The INITIALIZER attribute defines the function to be called to fill the item list of the COMBOBOX field.

Important: The initialization function name is case insensitive.

When using a function qualified with a module prefix, the runtime system will automatically load the module if it is not yet loaded. In such case, the module specification in the INITIALIZER attribute is sufficient.

Important: The module prefix of the initialization function name is case sensitive (unlike the function name, which is case insensitive).
When specifying a un-qualified function name (without the module as prefix), the module defining the initialization function must have been loaded before the form is loaded.
Tip: To make sure that the module is loaded, define other functions in the module, to be invoked with a regular CALL instruction before displaying the form.
The initialization function must be defined with an ui.ComboBox parameter:
FUNCTION func-name(var-name ui.ComboBox) RETURNS ()

For more details about combobox initializer programming, see Filling a COMBOBOX item list