The query determines which records are selected from the database for display or editing. Queries provide a built-in filtering mechanism so you can control how much data is displayed in a Table or FieldValue control. In more detailed terms, the query is the basis of the underlying SQL query’s “WHERE” clause, and for experienced programmers, this is perhaps the best way to think about queries. Depending on the query you specify, the result set can be as simple as single record from a single database table or as complex as multiple rows from a multi-table join.
|
|
|
The Query tab, shown here for a Table tag, is a filter that specifies which records will be selected for display or editing. The FieldValue, Record, Table, and TableStatistics tags all use variants of these Query options. |
Since the query is set at design time, application users can’t change your query. Moreover, if you add additional application user filtering via a RangeFilter, DateFilter or similar control, these application user filters further constrain the selection criteria; however, they can’t override the built-in selection criteria specified at the component level.
One or more records can be selected as a result of the query you specify. In the case of a Table tag, all records selected are available for display in the Table control. In the case of a FieldValue tag, only the first record returned is actually displayed in the FieldValue control, since a FieldValue control is capable of displaying only one field from a single record.
Displaying Field Values from Parent’s Record or Current Row in a Table
Adding a New Record to a Database Table