SQL View Selector

Used to select a value from a SQL view.

Properties

PropertyDescription
AutoCompleteModeDefines how the selectors behave. There are two possible values: Start / Contains.
EnabledBoolean indicating whether or not the component is enabled.
DocumentUnique ID of the document describing the SQL view.
DSNName of the external SQL source to use (if empty, use the data source declared in the SQL view doc).
FilterFilters the returned values (the possible filters are those defined in the SQL view).

Filters must use the syntax [field name]=[value].
FormatDisplayValueMacro 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.
FormatSelectValueMacro 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.
FormatResultValueMacro string defining a format for the value returned by the selector.
HintSpecifies the user hint string that will appear in the component's interactive help bubble.
SelectorColumnsList of fields to display as columns in the selector table that opens when the user clicks on a selector's button.
TabIndexInteger indicating the component's tab order (Qubes 5.6).
ValueInitialDetermines the component's initial value when the screen opens and each time it is reset (see Reset Button).
VisibleBoolean 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

Classification

Sélecteurs SélecteursDonnées