New Record Form Wizard


Overview


This wizard builds a page that displays a form allowing the user to enter a new database record. The following is an example:


You can start this wizard from the Wizards Menu. The first wizard page prompts you for miscellaneous document attributes.

Document Attributes

 

Create New Document (Yes/No)

By default, the wizard creates a new page and places the generated code into it.

If you would like to integrate the generated code into an existing page, click on the No radio button. This option will insert the new content into the active document. The content will be placed at the current insertion point of the active document.

Document Name

Indicates the name of the new page to create. This name will be used when you save the generated source file. It will also be used to name the created program object during compilation. The name is limited to 10 characters or less because iSeries object names must not exceed 10 characters.

Free-Format RPG

When this box is checked, all RPG code generated by the wizard will use free-format RPG. If you would like the wizard to generate fixed-format Calculation Specifications, leave this box unchecked.

Title

Indicates the document title and the document heading to generate. Theme templates control where and how the title field is used by utilizing the !title! placeholder.

Theme Selection and Preview

A Theme is a set of template files that describe the look of a generated application. Template files use standard html in combination with special placeholders. You can preview and select a theme by clicking on the button labeled with three dots next to the theme text field. When the theme selection window pops up, select the appropriate theme, and click Ok. A preview of the theme will be shown in the preview window. You can zoom in and out using the + and - buttons.

You can change existing themes or create your own by selecting the Wizards -> Themes pull-down menu option.

Page Type

The page type allows you switch between the Record Inquiry Page Wizard, the Record Update Form Wizards, and the New Record Form Wizard.

 

Field Selection

File Name

Type in or select the name of a physical or a logical file. If you have retrieved the field definitions for this particular file before, the record format name and available fields will automatically be populated from the local database repository; otherwise, you must click the blue button to get the field list from the iSeries.

Library Name

The Library Name field is used for locating the specified file when the "Get Field List from iSeries" button is used. It is recommended that you leave this field blank, in which case the compile-time library list defined under Tools -> Options is used. To change the library list on the fly, click on *LIBL.

Available Fields / Selected Fields

The Available Fields box shows you the file fields you can select for your add record page. If no fields appear, click the blue button to get the field list from the iSeries. The box shows you the field name, the field description, the field length and type, and the key sequence for keyed fields.

The Selected Fields box shows the fields you have already selected to show on the generated form.

Moves a field or fields from the Available to the Selected Fields box. Prior to clicking on this button, you should select one or more fields in the Available Fields box.

Moves all Available Fields to the Selected Fields box.

Removes a field from the Selected Fields box.

Removes all fields from the Selected Fields box.

 Changes the order of the selected fields by moving the chosen field up one position.

 Changes the order of the selected fields by moving the chosen field down one position.


How the selected fields appear on the generated Add Record Page is defined in the database repository's Sticky Input HTML field property. A snippet of HTML code is assigned to each field to determine how the field will appear (textbox, text area, list box, drop-down, checkbox, password field, etc.)
Right-clicking on a field name will open the Field Properties dialog, where you can specify these properties.

Required / needs validation checkmarks

On the Add Record field selection, each selected field has a checkbox by it. When checked, RPGsp will generate validation code for that field and place it in the Validate subroutine. The generated code makes the selected field a required field.

Use this option either for requiring field entry or for generating skeleton code that can be modified to create more elaborate validation logic.


Finishing the Wizard

Click Finish to start generating the new record form. After the generation process is complete, you must compile the page before you can launch and test it.

 


Profound Logic Software, Inc.
www.ProfoundLogic.com
(937) 439-7925