API Docs for:
Show:

DataSourceDescriptor Class

Describes a data source used for controls like GSComboBox, GSTable, etc.

Properties

allowEmptySelection

Boolean

Indiciates if the data source provides a "(None)" value for empty/none selection.

filter

String

A formula which filters the items from the source at runtime. It has two parameters, "d" is the current item and "customData.object" contains the data-object of the view. The filter should return true to let an item pass. Otherwise it should return false to skip the item.

prefixSource

Object

The prefix-source is put before the source. It is a predefined array of items. Each item can be just a string like:

["Apple", "Banana", "Orange"]

In that case the index of the selected item is stored. But it is also possible to define a separate alias-value which is stored instead like:

[{ name: "Apple", alias: "fruit_apple"}, { name: "Banana", alias: "fruit_banana" }]

where name only the display name and alias is the value stored.

source

String | Object

The source where the data should be taken from. It can be the name of a database category or a predefined array of items. If not configured different, the index of the selected item is stored. If there is a prefixSource defined the count of items from the prefix-source is added to the index-value. For a predefined array, each item can be just a string like:

["Apple", "Banana", "Orange"]

In that case the index of the selected item is stored. But it is also possible to define a separate alias-value which is stored instead like:

[{ name: "Apple", alias: "fruit_apple"}, { name: "Banana", alias: "fruit_banana" }]

where name only the display name and alias is the value stored.

sourceFormula

Object

A formula to calculate the source at runtime. It takes one parameter "d" which is the data-object of the view.