company logo

Data source definition

Data source definitions are part of project, window, field, column or region ( ADK_Field ) definitions. Data sources are not part of the control definition. The field combines the control definition with a data source, which allows using the same control for displaying data for any number of data sources with similar type. Data sources are also referenced in order to define data sources for multiple data source controls as lists with several columns or trees with region and columns.

Since (complex) controls are class methods of a complex data type, fields of a complex control typically refer to properties of the complex data type. Usually, data sources are initialized completely when adding a property to a control. Then, the control type will be detected and data source properties will be set properly.

While designing a control in the Designer , current data source settings might be viewed or updated by using the designer property window. In the property window, there is a Data tab in the top section describing field properties. On this tab a subset of most relevant data source properties will be displayed and might be updated.

There are still some properties, which cannot be seen or updated in this place. In order to get all field definition properties, one may press the field button above the table and a field property dialog pops up.

When creating a field, region or column for a control, data source properties are set properly when the resource gets the same name as the property in the complex data type. Project or window action data sources, however, have to be defined manually. The following data source properties might be set:

  • Data Reference Type - defines the type of the data source. The meaning of different data source types is described in the topic below.
  • Data Reference - is the data source name (extent, enumeration, property) or access path
  • Base Collection - is a data source name or access path for a superset of the data source. This is required for drop lists, but might be also used for lists or other controls in order to define a superset from which instances can be assigned to the current data source. By default, it is the superset defined in the database model (if there is any).
  • Order Key - index name defining the order for displaying items in a list. Default is the main order of the collection.
  • Class Nam e - name of complex data type mainly for user-defined data sources
  • Filter - condition for selecting a subset of instances to be displayed in a list.
  • Access Mode - undefined access mode indicates, that the access mode is inherited from the parent control or action. One may, however, change data source to read in order to avoid changes for the control.
  • Collection - indicates that the control refers to a collection rather than to the selected instance.
  • Auto-position - automatically selects the first instance in a property handle, when no instance has been selected so far
  • Use Copy - create a cursor copy for the property handle in order not to interfere with other controls referring to the same data source (disables cursor synchronization of data sources).
  • Auto-initialize - provides an initialized instance in the property handle when no instances are available.
  • Ignore Case - uses case insensitive order
  • Descending - provides reverse order, which is descending, when the selected index is ordered ascending and ascending, when the selected index defines a descending order.

More details about data source properties you will find in ModelReference/Designer data source .

Related topics