Creating new forms

When you create a new form with InfoMaker, you always specify the data source and form style of the form. Then you define the data for the form, and InfoMaker generates the basic form.

Once you have the basic form, you can name the form and save it. Then you can continue to enhance the form to make it easier to use.

The following discussion introduces you to a few form concepts and terms. When you are ready to create a particular type of form, you can follow the steps for the type.

New Form dialog box

You specify the data source and form style in the New Form dialog box:

The sample shows the New Form dialog box. At top is a group box labeled Data Source with labeled icons  for Quick Select,  Sequel Select, and Query. At bottom is a group box labeled Form Style with the choices Free Form, Grid, Master / Detail One To Many, and Master / Detail Many To One.

Data sources

The data source you use determines how InfoMaker retrieves data for your form. You can select one of three data sources when you create a form:

Data source

Pick this data source when

Quick Select

The data is from tables that are connected through a key, and you need only to sort and limit the data.

SQL Select

The data is from tables that are not connected through a key, or you want more control over the SQL SELECT statement generated for the data source.

Query

The data has been defined as a query.

NoteFor master/detail forms You always use the Quick Select data source for master/detail forms.

For complete information about data sources, see “Selecting a data source”.

Form styles

A form style is a predefined way of presenting and processing information in a form. Each form you build in InfoMaker is based on an existing form style.

InfoMaker provides four built-in form styles:

Form

What it shows

Freeform

One row of data at a time

Grid

Rows of data in a grid

Master/Detail One-To-Many

One item in a freeform area at the top and a grid with details about the item at the bottom

Master/Detail Many-To-One

Many items in a grid at the top and a freeform area with details about an item at the bottom

In addition to the built-in form styles, PowerBuilder developers in your organization can develop custom form styles to meet your organization’s needs. Custom form styles also display in the New Form dialog box.

For information about creating custom form styles, talk to PowerBuilder developers in your organization.

Actions in a form style

Each form style has a set of predefined actions. An action is a procedure you can attach to buttons you place in a form. Usually a style includes the common database actions (insert, update, and delete rows). Each of the built-in form styles of InfoMaker has these database actions and additional actions that are useful and appropriate to the form style.

For example, you can place a button in a form and then attach the Print action to it. After you run the form, you can print the current data by clicking the button:

The pop-up menu for the button includes the Action item.The sample shows the Select Action dialog box. Text at the top says "Select an action from the list below and provide parameters as required." A drop down list labeled Actions shows the Print action highlighted.

Actions are also available through the toolbar and menu items when you run a form.