Data Table Selection
The data table selection field edit type lists the records of a data table in a drop down list control on the detail screen. Definable behaviors of this list include the data table field to display, the sort order for display, and the value by which to sort. A popup screen may be displayed based on the number of records in the data table. This threshold is different for each supported device type.
When displaying the records from the data table in the drop down list, the code, value, or both may be displayed. Additionally, format strings may be used to format the text for each record. When a selection is made in the list, the value returned to the field is always the code portion of the selected record. This will be the value set to the target property of the field.
Data Table Selection Attributes
- Data Table Name: This attribute references the data table whose records will be listed in the drop down list for this field.
- Sort By: This attribute allows you to sort the values listed in the drop down list by one of several options: Code, which is the code field in each table record; Value, which is the value field in each record; Displayed Text, which is the text displayed for each record in the field; and Order in Data Table, which is the order in which the records are listed in the data table itself.
- Sort Order: This attribute specifies whether the records displayed are sorted in ascending or descending order. This is a string sort.
- Display Type: This attribute specifies which fields from the data table records should be displayed in the drop down list. The options are: Code, meaning the code field in each table record; Value, which displays the value field from each record; Code - Value, which displays both fields from each record, separating them with a hyphen; and Format Text, which allows you to specify format strings to format the values displayed in the list for each record.
- Format Text: If the Display Type attribute is set to “Format Text” this attribute will be enabled. Format strings can then be entered in this attribute to format each record from the data table. The valid format strings for this field are %code, %value and %position. This last will display the position number of each record as stored in the data table. This last option is used mostly for testing purposes and is generally not found in the production version of an application. This attribute can also contain any other printable characters, excluding tabs and carriage returns, to format the display of the table’s records.
- Editable: This attribute specifies whether or not users can manually enter text values in the field for values not found in the data table displayed by the field. When this attribute is set users can either select from the list or enter a value manually. When not set, users will be required to select an item from the list. This attribute can be set if the field is defined to be read-only if the field also has an update rule defined, if that rule can return values not found in the data table.
- Define separate display type for popup dialog: This attribute allows you to display the records from the data table differently in the popup dialog vs. the drop down list for the field. If set to false, the display and format attributes listed above will also affect the popup dialog. If set to true, the attributes listed next will provide separate display behaviors for the popup dialog.
- Display Type (Popup Dialog): The options for this attribute are the same as the Display Type options listed previously. The option selected here will impact the appearance and behavior of the popup dialog displayed for larger data tables.
- Format Text (Popup Dialog): The format strings for this attribute are the same as the Format Text options listed previously. The format text entered here will impact the appearance and behavior of the popup dialog displayed for large data tables.