SQL View Selector
Used to select a value from a SQL view.
Properties
| Property | Description |
| AutoCompleteMode | Defines how the selectors behave. There are two possible values: Start / Contains. |
| Enabled | Boolean indicating whether or not the component is enabled. |
| Document | Unique ID of the document describing the SQL view. |
| DSN | Name of the external SQL source to use (if empty, use the data source declared in the SQL view doc). |
| Filter | Filters the returned values (the possible filters are those defined in the SQL view). Filters must use the syntax [field name]=[value]. |
| FormatDisplayValue | Macro string defining a display format for the text in the selector's text zone. Only the fields used to define display formats will be used to filter the elements in the selector list. |
| FormatSelectValue | Macro string defining a display format for an element in the selector list. These fields are not used to filter the elements in the selector list. |
| FormatResultValue | Macro string defining a format for the value returned by the selector. |
| Hint | Specifies the user hint string that will appear in the component's interactive help bubble. |
| SelectorColumns | List of fields to display as columns in the selector table that opens when the user clicks on a selector's button. |
| TabIndex | Integer indicating the component's tab order (Qubes 5.6). |
| ValueInitial | Determines the component's initial value when the screen opens and each time it is reset (see Reset Button). |
| Visible | Boolean indicating whether or not the component will be visible. |
List of available fields
The available fields are those defined in the SQL view.
Value
The component returns the value defined by the FormatResultValue property, if the selection is valid; if not, it will return an empty string.
Remarks
You absolutely must enter the unique ID for the document describing the SQL view as the Document attribute.
Examples of filters
Three syntaxes are available for multi-filtering:
- Use a named range of cells whose first column is the field name and whose second, the value. The next fields are written on the following lines.
- Use the List() function, in one of two ways:
=List('FieldName1','FieldValue1','FieldName2','FieldValue2',...)
=List('FieldName1=FieldValue1','FieldName2=FieldValue2',...)
Remember to also define the filters in the SQL view:
Define a FieldName1 parameter of the right type (string, integer, etc.). That parameter's name will be the one used by the filter on the input screen.
Define a filter as follows: field_sql_code=:FieldName1