QUERYEDITABLE attribute

The QUERYEDITABLE attribute makes a COMBOBOX field editable during a CONSTRUCT statement.

Syntax

QUERYEDITABLE

Usage

The QUERYEDITABLE attribute is effective only during a CONSTRUCT statement. This attribute is useful when the display values match the real values in the ITEMS attribute, for example when ITEMS=("Paris","London","Madrid"). Do not use this attribute when the real field values are mapped to display values, for example when ITEMS=((1,"Paris"),(2,"London"),(3,"Madrid")).

During a CONSTRUCT, a COMBOBOX is not editable by default: The end-user is forced to set one of the values of the list as defined by the ITEMS attribute, or set the 'empty' item. The QUERYEDITABLE attribute can be used to force the COMBOBOX to be editable during a CONSTRUCT instruction, in order to allow free search criterion input such as "A*". If QUERYEDITABLE is used and the ITEMS are defined with key/label combinations, the text entered by the user will be automatically searched in the list of items. If a label corresponds, the key will be used in the SQL criterion, otherwise the text entered by the user will be used. For example, if the items are defined as ((1,"Paris"),(2,"Madrid"),(3,"London")), and the user enters "Paris" in the field, the item (1,"Paris") will match and will be generate "colname = 1". If the user enters ">2", the text does not match any item so it will be used as is and generate the SQL "colname > 2". Users may enter values like "Par*", but in this case the runtime system will raise an error because this criterion does is not valid for the numeric data type of the field. To avoid end-user confusion, a COMBOBOX defined with key/label combinations should not use the QUERYEDITABLE attribute.