Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Overview

This is a field used for a selection of options. The values for this field are set by the 'choices' property. The 'choices' property is also used to receive input in a Rich UI application through field binding.

Validation (Rich UI Only)

Please visit the Validation and Error Messages page.

Field Binding Dialog (Rich UI Only)

(Input link to Field Binding page under Widget section)

Choices / Choice Values

  • Choices field - Is where your set the options in order how you would like the select box to display them.
  • Choice values field - Is where the value you want returned to your application is set.

Here are two ways to populate the choice option/values properties:

  1. Comma separated list - A simple list of values separated by just a comma (i.e. Option 1, Option 2, Option 3, etc...).
  2. 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", "ElementThree"] ) 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).

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

Database-Driven Auto-Complete

This section allows choices/choice values to be retrieved from a database file.

Choices database file - Enter the database file to use to populate your options/values. When setting your database file it's not required to qualify with library name, although you can. if the library is omitted, the application job's library list will be used.

Choice options field - Select the field(s) you wish to use to search. If there are multiple fields specified in the choice options field this will allow you to return multiple values in the auto-complete search. However, only the first value in the field will be used to search, any other selected fields are for display only as additional columns.

Choice values field - Select the field to return a value to your application.

In the example, records will be loaded from file CATEGP. The records will be searched on field CNAME and CATID, with field CATID displaying in a second column (see below). The value in field CATID in the selected record will be returned to the program.

  • No labels