Selecting Fields for Query

Define order to display data and window Select Fields is displayed. You select fields to be in query in this window. Each field selected is new column for query.

Window Select Fields is divided in two areas: Left, where relation tables and all its fields are displayed. Right, where all fields for query as they are chosen are displayed.

Procedures

To select the query fields:

1. On left area, click + beside table name which will have its fields chosen.

Table fields are listed.

2. Click field name to be displayed in query and then Add.

Field name is added.

3. To add all fields in one operation, click Add All.

System adds all fields of table.

4. To delete field from list, use Delete and Delete All to delete one or more fields, respectively.
5. To define formula/expression in AdvPL syntax, click Formula and then Add.

System displays screen New Formula.

6. In field Table, select one of the related tables to create formula/expression.
7. In field Expression, type expression in AdvPL syntax.
8. To query tables fields, click Query fields.

Fields of main table are listed and then those of related table.

9. Enter in the following fields:

Header - header for the field.

Format - the mask (picture) to format how data is displayed in the query.

Size - the quantity of columns to be reserved to display field.

Example:

To create column with part code and description, you can define:

Expression

SB1->B1_COD+SB1->B1_DESC

Header

Cod_descrição

Format

9999999.99

Size

10

 

10. Check data and confirm them.

System returns to screen Select Fields displaying formula created.

Procedures

To edit the properties of display of a field:

1. Click the field to be edited and then Edit.

Window Proprieties is displayed.

2. Change header of field and/or its format.

If you use field type Memo, you have to define mask Format with mask @S<número de posições to limit display of content (ex.: @S20).

3. Check data and confirm.

4. Click End.