Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Auto-complete allows your textbox field to automatically suggest choices based on text entered into the textbox.

Image Added

The auto-complete choices/values can be populated by entering something as simple as a series of choices using a comma separated list or it can be as complex as passing JSON through a web service such as a PHP program. Auto-complete can be used to obtain records from a database as well. multiple ways:

Comma separated list - A simple list of values separated by just a comma (i.e. Apple, Orange, Banana).

Database file - See Database-Driven Auto-Complete section below.

JSON array format - Using JSON array format, meaning the choices/values are enclosed in a bracket with quotations and then comma separated (i.e. ["ElementOne", "ElementTwo"] ) within the choices and choice values fields also allows you to populate the auto-complete, these fields can also be bound to an RPG field (Rich UI only).

Image RemovedWeb service - You can pass JSON through a web service such as a PHP program to complete the choices and choice value fields (see choices URL example below).

Database-Driven Auto-Complete

This section allows the correct choices to be retrieved from a Database database file. In order to use this, simply enter the name of the database file, the name of the choice option field(s) you would like to search by, and the name of the choice value field you wish to return to your application..

 

If there are multiple fields specified in the choice options field this will allow you to return multiple values

The selection criteria can be used to filter the choices similar to an SQL WHERE clause. There is no need to qualify the database file name with a library name, although you can if required. Once the file name has been entered, the "..."  button in the choice options and choice value fields will open the dialog box shown below. This dialog lists all the fields in the specified file allowing easy selection of the correct field names.

Dynamic Auto-Complete - Choices URL