Add a Query
To add a new query, follow the steps below:
- Press New button in the Query tab.
- In the Query field, type the name of the query.
- Uncheck Main query checkbox, if already checked (*if this is not the main query of your program) as there can only be one main query in a program.
- Enter the table name(s) to be used in the query. Multiple table names are separated by a ‘,’ (comma).
- Keep on pressing the TAB key until a Query statement is generated in the Query clause A Query statement is generated only if the Query clause field is previously empty. The generated query statement can be modified manually as required.
- You can check the syntax by clicking on the Now button.
- Save the query.
Note that a query is associated only with combo boxes, look ups, selection tab types of widget types, but not with Fill-In or Checkbox widget types. The Query Clause field should never be empty for any query.

Different fields used in the Query section of a program composer are explained below:
Field | Description |
---|---|
Query | Name of the query is entered in this field. |
Main query (check-box) | This checkbox is selected if the query selected is to be made as the main query of the program. |
Remote query (check-box) | This checkbox is selected if needed to fetch temp-table record from dataset. |
File in query | Comma separated list of Tables involved in the query. Ignore spaces between file names. |
External Tables | If there are more than one tab folders in a program, then the tables used in the previous tab could be the external table for the current tab folder. There can be only one external table for the current tab folder.In the query clause there is no need to mention the where clause btw the file in the query and the external table. |
Query Clause | In this field the actual query is to be written. |
Dataset path | Dataset path if dataset is to be used in the query. |
Syntax Check | Selecting this option will check the syntax of the query written in the Query Clause. |
Force open (check-box) | Select this checkbox in order to force open the query in case of error. |
Comment | Users can enter any comments in this field. |