Versions Compared

Key

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

...

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.

...

In the example, records will be loaded from file CATEGP. The options will be populated by field CNAME. The value in field CATID in the selected record will be returned to the program.

Choice selection criteria - This acts as a WHERE clause in an SQL statement to filter your criteria. SQL parameter markers are always specified by a question mark (?). The property "choices parameter value" can be used to provide the value for this parameter marker.

Image Added

This will produce an SQL statement like this:

Code Block

SELECT DISTINCT CNAME, CATIDFROM CATEGPWHERE CNAME = ?

Choice parameter value - This is where the choice selection criteria value for '?' is set. This value may also be bound to a field (Rich UI only). Image Added
By completing the choice parameter value we can see our statement should return only the items named "Soaps". Multiple "parameter value" properties can be added by right-clicking the property name and selecting "Add Another Choices Parameter Value": Image Added

To find more information on the choice selection criteria and choices parameter properties, view the Parameter Markers section here.

Max Choices
The max choices property allows you to set the number of choices you will see from your database-driven selection. There is no limit to the number of choices you can show, however if there is no limit set the default is 10.

...