Previous Next

Data sources are the objects from which fields obtain their data. There are two basic types of Data Source: Variable Set Data Sources and Table Data Sources. A Table Data Source represents data from the database and its contents are automatically synchronized to the database upon commit. A Table Data Source has the following subtypes: info, lookup, related and dropdown. The various subtypes are generated based upon the relationships between tables that have been specified in the Definer. The default pages contain working constructs that make use of the various data source objects.

 

The various data source objects that can be specified are listed and briefly described below.

 

 

Lookup Data Source

This data source is typically used to look up a parent key from the context of a child table. In the controls catalog there is a Lookup data source available for each parent in your data model. This data source is always located on the lookup page that is opened after pressing a lookup button. The various parts of the Lookup data source work together as follows:

 

 

Tablecolumn

These are the database columns of the associated table and they will all be queried when the lookup data source is used. To save bandwidth you may remove non-primary key columns from the Lookup data source.

 

Lookup

This is the container that holds the list of columns that is copied to the calling page when a record is selected using acceptLookupValue (as in default pages). The lookup is synchronized to the data source of calling table page using the Synchronization Data Source property. Multiple data sources may be specified in this property, each data source on a new line. This enables calling of the same lookup page from different pages as long as they use the same column names for the linked columns.

 

Path-notation related to the page stack is used in the list, see page stacking for more information.

 

Lookup Column

This type of column is placed inside the lookup container. It should be synchronized to appropriate column of the calling table specified in the lookup container. You cannot specify multiple columns here, whereas you can specify multiple tables in the lookup containera source.

 

Related Data Sources

These are similar to Lookup sources, but then for related pages. They are typically used to display child records synchronized to a parent record.

 

 

Relate and Relate Column

See Lookup

 

RelateColumn:

See Lookup Column

 

Table data source

For each table in your data model a table data source is available on the controls tab. Calling executequery(<dsname>) will make the page engine attempt to query data from the database for this data source. A table data source has the following subtypes: info, lookup, related and dropdown. The various subtypes are generated based upon the relationships between tables that have been specified in the Definer.

 

Table Column

In the standard Table data sources, all table columns are matched by a column in the database, and all these columns are automatically queried form the database by the Page Engine. In some cases, you may wish to manually add a table column that does not have a matching column in the database. To prevent the page engine from attempting to query a non-existent column, supply the output expression property on such a table column.

 

 

Variable Set data sources

This type of data source can be used to store any kind of variable, in this case this data source holds only one record. It may also serve as output data source for a SQL Statement, in this case it might hold more then one record. You cannot search on a Variable Set data source.

 

Variable

You can give data sources a name and set variables according to the name. If the variable set data source serves as output for a SQL statement, the variables will be assigned according to the column order in the SQL statement.

 

Option Control

Options are usually generated based on allowed values in domains. However sometimes you may want checkboxes or dropdowns that are not directly linked to database columns. In these cases you may manually add options to a Variable or Table Column and link the desired control with these data source items. Also you may manually add pages as options to the default NavigateToMore list that is generated for you based on your relational data model.