ui.Dialog.setCompleterItems

Define autocompletion items for the a field defined with COMPLETER attribute.

Syntax

setCompleterItems(
   items-array DYNAMIC ARRAY OF STRING )
  1. items-array defines the list of proposals to be passed to the front-end.

Usage

The setCompleterItems(items-array) dialog method defines the list of proposals for the current field, to implement autocompletion.

The field must be defined in the form with the COMPLETER attribute.

The list of proposal items is passed as a dynamic array of strings:
DEFINE items DYNAMIC ARRAY OF STRING
To cleanup the proposal list for a give field, pass NULL as second parameter to the function.
Important: The method will raise error -8114, if the list of items contains more than 50 elements. Note that this error is not trappable with exception handlers like TRY/CATCH, the code must avoid to reach the limit.

See Enabling autocompletion for more details.

Example

DEFINE items DYNAMIC ARRAY OF STRING
...
   ON CHANGE firstname
      -- fill the array with items
      LET items[1] = "Ann"
      LET items[2] = "Anna"
      LET items[3] = "Annabel"
      CALL DIALOG.setCompleterItems(items)