Selection screens are available for the GUI interface, but not for web applications.
In Lesson 4, you created a master-detail screen that joined two tables:
orders. In this lesson, you create another master-detail screen that joins the
orders table as the primary master table to the
order_items table. In addition to columns from the
order_items table, the screen's detail section also includes data from the
titles table. Thus, it can display the titles of the videos.
Because the screen's detail section contains multiple tables, the screen wizard:
In this lesson you learn how to:
In this lesson you learn how to:
When you use the screen wizard, the first table you select for a section—master, detail, or subdetail—is considered the first (primary) table view for that section. For the screen you create here, select
orders as the first master table and join it to
order_items as the first detail table.
The New Screen Tool dialog opens.
The Format Selection dialog opens.
The First Master dialog opens.
ordersfrom the list of Tables To Pick From.
This specifies to include all columns in the
orders table on the completed screen.
The First Detail dialog opens.
order_itemsfrom the list of tables.
pricein the list of columns in
The selected columns are added to the list of those already chosen.
The screen wizard lets you include information from other database tables in the same section, as long as the corresponding repository screens specify links to the section's first table. By selecting the
titles tables in addition to the
order_items table, the screen's detail section can display the name, number of available copies, and standard unit price of each video, along with the price and quantity data from
order_items. The screen wizard includes links that define the relationship between
The Additional Detail dialog opens and shows which tables can be joined to the
titlesfrom the list of tables.
The list of columns belonging to the
titles table displays.
The Layout Selection dialog opens.
The Style and Finish dialog opens.
When you include columns from additional tables, the screen wizard lets you decide whether to generate selection screens. The usefulness of selection screens depends on the client screen's function. For example, a data entry screen might make good use of a selection screen, while a display-only client screen probably would not.
More About Selection Screens
When the Generate Selection Screens check box is selected, the screen wizard automatically creates a selection screen for every additional table that you include on your client screen.
Selection screens, sometimes called pick lists, are useful when a user is adding a new record to the database. The selection screen displays a list of acceptable values for a field when the user requests help.
Order Item Detailand choose Done.
A preview of the client screen displays:
When the wizard finishes building the screens (notice the status bar), the results include two screens:
Save the screens to
The Save Screen dialog opens.
client.lib. You can close the screen after saving.
Now test the screens.
The Order Item Detail screen opens.
The first record in the
orders table displays. Several
order_item records are associated with this order. They are displayed in the grid.
Title_idfield of the first empty row in the grid.
The Titles Selection screen opens and displays all video records in the
titles database table.
Cinema Paradisoand double-click on the ID to select that video.
The selection screen closes and the record you selected appears in the grid on the Order Item Detail screen. The cursor advances to the next data entry field in the grid (
3in the Qty column.
Add another item to this order, but this time, enter the title identification number. Panther uses a validation routine to ensure that the entry is valid.
TABto advance to the next empty row and type
Title_idcolumn. Press Enter or
Willie Wonka and the
Chocolate Factory is the name of the video associated with the specified ID number.
This action saves the new items to the selected distributor's order.
You created an order entry screen that provides an easy way to add items to an order. You did this by performing these tasks:
What did you learn?