ui.Dialog.setCompleterItems

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

Syntax

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

Usage

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

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

The list of completion proposal items is passed as a dynamic array of strings:
DEFINE items DYNAMIC ARRAY OF STRING
To cleanup the completion 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)