Release 10.1A: OpenEdge Development:
Progress 4GL Handbook

> ## Creating a dialog box procedure

> You can also use the `h-dbbrowser` window to define a temp-table with any fields you want, from one or multiple database tables, and then populate that temp-table with a query.

> | To create a dialog box procedure:

> 1. Click the Get Temp-Table button. A dialog box appears where you enter the following information:

> - A list of database tables to base your temp-table on.
> - A `FOR EACH` statement to use to populate the temp-table.
> - A list of fields to add to the temp-table. You should qualify these fields with their database field names, but the temp-table fields will just use the base field names. The temp-table also gets a row counter field called `iCount`.
> - A name for the temp-table.
> - A maximum number of rows to retrieve into the temp-table.

> Here’s an example that joins Order to Customer and selects the OrderNum, OrderDate, CustNum, and Customer.Name fields for Orders less than 100:

> 2. Click OK in this dialog box and select all its fields in the main window. You see the contents of the temp-table in the dynamic browse:

> Here are a few interesting parts of this code:

> The `getTempTable` procedure runs a separate dialog box procedure called `h-dlgtt.w`, built in the AppBuilder from the Dialog template (that is, by selecting New Dialog in the AppBuilder). This is the Temp-Table Query dialog box used to define the `OrdCust` temp-table above. It is a fairly standard dialog box procedure, which prompts for some field values and returns them as `OUTPUT` parameters `ON CHOOSE` of the OK button. You can use a dialog box such as this anytime it is necessary to block other input in your application until the user has provided information the dialog box is prompting for.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095