Selecting columns

You can click each column you want to include from the table representations in the Table Layout view. PocketBuilder highlights selected columns and places them in the Selection List at the top of the Select painter.

Figure 17-17: Column selection list in the Table Layout view

The sample displays a horizontal scroll area labeled Selection List. Arranged to the right are four column names outlined with rectangles: emp _ i d, emp _ l name, emp _ f name, and dept _ i d.

StepsTo reorder the selected columns:

  1. Drag a column in the Selection List with the mouse. Release the mouse button when the column is in the proper position in the list.

StepsTo select all columns from a table:

  1. Move the pointer to the table name and select Select All from the pop-up menu.

StepsTo include computed columns:

  1. Click the Compute tab to make the Compute view available (or select View>Compute if the Compute view is not currently displayed).

    Each row in the Compute view is a place for entering an expression that defines a computed column.

  2. Enter one of the following:

    You can display the pop-up menu for any row in the Compute view. Using the pop-up menu, you can select and paste columns, functions, and arguments (if you have created any) into the expression.

    NoteAbout these functions The functions listed in the pop-up menu are functions provided by your DBMS. They are not PocketBuilder functions. This is because you are now defining a SELECT statement that will be sent to your DBMS for processing.

  3. Press the Tab key to get to the next row to define another computed column, or click another tab to make additional specifications.

    PocketBuilder adds the computed columns to the list of columns you have selected.

About computed columns and computed fields

Computed columns you define in the Select painter are added to the SQL statement and used by the DBMS to retrieve the data. The expression you define here follows the rules of the DBMS.

You can also choose to define computed fields, which are created and processed dynamically by PocketBuilder after the data has been retrieved from the DBMS. There are advantages to doing this. For example, work is offloaded from the database server, and the computed fields update dynamically as data changes in the DataWindow object. If you have many rows, however, this updating can result in slower performance.

For more information, see Chapter 18, “Enhancing DataWindow Objects.”