Input Field Type Descriptions

Input fields are fields in which you can type or display data. The system displays these fields on the form as a series of either uppercase Xs or Zs. The Xs indicate an alphanumeric field (it can include letters, numbers, and some special characters). The Zs indicate a numeric field (for example, signed fields, percent fields, date fields, and so on).

Database

A database field is a field you select from the primary or detail file. You must paint all key fields (fields that are part of the access order) on the form as input-type database fields.

On a header-detail form, you must paint all key fields from the primary header file in the header area of the form. In the detail area, you must paint all key fields from the detail file that are different from the key fields in the header file.

For example, the primary file Employee has the key fields Company, Department, and Employee. The detail file Dependents has the key fields Company, Employee, and Age. Paint the key fields Company, Department, and Employee as input-type database fields in the header area, and paint the field Age as an input-type database field in the detail area.

Company  ZZZZ    Department   XXXXX     Employee  ZZZZZZZZZ

F/C    Age    Dependent Name
  X     ZZ     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  X     ZZ     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  X     ZZ     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  X     ZZ     XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Inquiry Key

An inquiry key field is a key field from the detail file that the form uses for random access to that file. After you paint the detail area, you can paint an inquiry key field in the header area of a detail form.

For example, the following detail form displays vendors by vendor name. The Begin at Vendor Name field is an inquiry key field. When you type CA in the Begin at Vendor Name field, the form displays vendors beginning with those whose names start with CA.

Company  ZZZZ   Begin at Vendor Name   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Vendor Name                        City                    State
   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXXXXXXXXX     XX
   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXXXXXXXXX     XX
   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXXXXXXXXX     XX
   XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX     XXXXXXXXXXXXXXXXXXXX     XX

Order

If a form has more than one access order (index) for displaying records, you must paint an order field on the form. When you define an access order, you assign a one-character value to it. When you run the form, you type one of these values in the order field. The form displays the records in the order that belongs to the value you typed.

You need only one order field to handle all access orders that the form uses. If you want the valid values for the order field to display on the form, you must paint them; the system does not automatically display them.

For example, a detail form can display employees either by the last name, number, or social security number. The value you type in an order field tells the form in what order you want the records to display. When you type A in the order field, the form displays employees in last name order. When you type "N", the form displays employees in employee number order. When you type "S", the form displays employees in Social Security number order.

If you want to paint the description of the current value typed in the order field, you can paint it with an order name field. For more information, see the Order Name field description in Painting Fields on a Form - Output Field Types.

For instructions, see Defining Access Orders.

Record Select

A record select field tells the form which selection criteria to use when displaying data from a detail file. You can paint a record select field on detail forms only.

When you define a record select condition, you assign a one-character value to it. When you run the form, you type one of these values in the record select field. The form displays only the records that satisfy the condition associated with the value you typed.

You need only one record select field to handle all record select conditions that the form uses. If you want the valid values for the record select field to display on the form, you must paint them; the system does not automatically display them.

For instructions, see Defining a Form Record Selection.

Condition Select

When you paint a condition select field, you select a field from the database and then you select an operator (=,, >,, <, or ). You can paint a condition select field only on detail forms.

When you run the form program, you type a value in the condition select field. The form then displays the records whose database field value corresponds to the condition select field value you typed using the operator you chose when you painted the field.

For example, you want a form to display employees who started before a certain date. When you paint the condition select field, select the Start Date field, then select the less-than (<) operator in the Condition field in the Form Input Field Definition window. When you run the form program, you type a date in the condition select field. The form displays all employees who started before that date.

Range Select

A range select field tells the form to display only the records whose selected field value is within the range of values typed in the range select field. You can paint a range select field only on detail forms.

Button Field

A button field tells the form to transfer the user to the window represented by the button. When you run the form program, press Define (F6) or Detail (F5) on the button field. The system displays the window whose form ID corresponds to the form ID you typed when you painted the field. Button field names do not have to be unique.

For example, you want a form to have a button field that transfers users to a related form. When you paint the button field, type the Command Id name, then select the desired form ID.

When you run the form, the system displays the button field with the Command Id name as the button.

For instructions, see Defining a Button Field.

Form Action

A form action is a single character that tells the form what action to perform. For example, the I action tells the form to inquire on a record in a file and display it.

Each form has a main action governing the entire form; detail forms can also have a line action, for each detail line on the form. The line action tells the form what action to perform on the detail record.

When you create a form or a detail area on a form, the system automatically paints the form actions. You cannot delete the form action. You can delete the line action if the form does not need it to perform an action on the detail lines. If you delete a line action, you can paint it back on the form. For instructions, see Defining Form Action Events.