Fields on a Form
A field is a space for data entry or display on a form. It usually corresponds to a column in a database table, but also can be used for other purposes in an application, such as displaying instructions or the results of computations, or for entry of user names and passwords.
There are two kinds of fields:
• Simple fields—Data is displayed one item at a time.
• Table fields—Multiple rows and columns of data are displayed simultaneously.
If you create a form for a table, you choose one of these formats. On forms associated with JoinDefs, the JoinDef specification determines which data is displayed in simple fields and which is displayed in table fields.
Both simple fields and table fields consist of an internal name, data window, attributes, and an optional title, as described in the following sections.
Internal Name of a Field
The internal name of a field is the name by which VIFRED identifies the field. This does not have to be the same as the field's title that users see on the form. The internal name of the field identifies the field to application procedures written in a programming language or created with Vision or Applications‑By‑Forms. The application code uses the field's internal name to move values to and from the field.
Data Window
The data window is the space in a field where data is entered or displayed. The display format of the data window controls how the data appears when displayed on the form. For a data entry field, you can specify a data input template as the display format to control the way in which the user enters data in that field. If a field corresponds to a data column in a table, the display format for that field must be appropriate for the data type and length declared for the column in the database table. While data type and data display format are related, they are distinct and different entities. Data type identifies the kind of data. Display format refers to how the data is presented or entered on a form.
A single data type can have many different display formats, and some display formats can be applied to more than one type of data. For example, numeric type data can be displayed as whole integers, decimal numbers, and in scientific notation. The scientific notation display format can be used with both numeric and monetary data types.
Field Attributes
Attributes are screen effects such as color, blinking, underlining, and uppercase and lowercase changes, as well as other information about each field.
Field Title
The title of a field, which is optional, is the name of the field that appears on the form. The title provides a short description of the data that appears in the field's corresponding data window. A field's title can be different from its internal field name.
On a default form created by VIFRED from a table or JoinDef, VIFRED initially creates a field title that is similar to the field's internal name, with these exceptions: VIFRED capitalizes the first letter of every word in the title, removes any underscores to create multiple words, and adds a colon (:) at the end of the field title. You can change the field's title if you want.
Last modified date: 04/03/2024