Procedure: Creating forms

To create a form, point to New in the Explorer menu and choose Form.

  1. Name the form.

Enter the name of the form in the Name field of the Form Definition window. Since the form name will be used in scripts, you may want to substitute underscores for spaces in the name.

  1. Select a form series.

The form series provides a method of grouping related forms of a Dexterity application together under general headings, such as Sales, Financial and System.

  1. Attach any tables to the form and specify table options.

Tables must be attached to the form so the windows associated with the form will have access to the tables. Click the Tables tab in the Form Definition window to display the list of tables attached to the form. To attach a table to the form, click Attach. The Table Lookup window will appear, allowing you to select a table. Select a table and click OK. Repeat this process until all the necessary tables are attached.

To select options for a table, select the table in the Form Definition window and click Options. The Table Options window will appear.

The Table Options window allows you to specify how the form will access a particular table. The form can access the table in read-only, read/write, or exclusive use modes. You also can choose whether the table will be opened the first time it’s accessed by a script or when the form is opened.

The following table options are available:


Table access modes

Read Only

The table can only be read.


The table can be read and written to.

Exclusive Use

When this form is accessing the table, no other forms or scripts can access the table.

Mark the Open During Form Open selection to open this table when the form opens, rather than when the table is first accessed by a script. You can use this selection when some of the tables are set for exclusive use, because then the form can’t be opened unless all the exclusive use tables can be opened.

If the table is a SQL table, the cursor block size for the table can also be specified. Refer to Cursors for additional information on setting the cursor block size.

Click OK to save the displayed table options and return to the Form Definition window.

  1. Create any form menus.

You can add menus or menu items to the menu bar at the top of the screen. These menus will appear when the form opens. Refer to Form-based Menus for information about using menus.

  1. Create windows for the form.

To create windows for the form, click the Windows tab in the Form Definition window. Click the New button; the layout window will appear, allowing you to create a window. Refer to Windows for more information about creating windows.

  1. Specify the main window.

At runtime, when the window designated as the main window is closed, the form and any other windows associated with the form will close. By default, the first window in the list is the main window for the form. To select a different main window for the form, be sure the Windows tab is selected in the Form Definition window. Select the window you want as the main window and click Set Main; the window will be move to the top of the list, indicating it is the main window.

  1. Add scripts to the form.

Click the Scripts tab in the Form Definition window to add scripts to the form. You can add scripts that run when a form opens or closes. These will be discussed in Attaching Scripts. You can also add form-level procedures and form-level user-defined functions. These are described in Procedures and User-defined Functions, respectively.

  1. Save the form definition.

Click OK to save the form definition.

Documentation Feedback