Form View

In the Form View users can view, add, edit and delete records in the database, depending upon their specific privileges to the underlying view. Gatsby dynamically builds each form by examining the structure of the database.

A Form view contains four main sections: Titlebar, Toolbar, Body and Navigation Bar.

The form body is divided into two main parts, the master section and the detail section. The master section contains all of the fields for the record at which you are currently positioned.  The detail section provides ways for you to view and navigate to records that are related to the master record.

Master Section

Fields appear in the order defined by your database design.  To provide a different order create a view or select-only query that exposes only the fields of interest in the desired order.  Primary key fields that are auto-increment or identity will not be exposed if they do not participate in the row caption.

Field Labels

Field labels are defined by the attribute caption.  See Defining Captions and Descriptions for more information.  Required field labels are displayed in a bold typeface. Read-only field labels are displayed in a dimmer typeface.

For certain browsers, if you have specified a description for the field, you can view it as a tool-tip by holding your mouse over the field label.

Field Types

The following table shows how each type of field is displayed in the form.  See the release notes for your database platform to determine how the native types are mapped to Gatsby Database Explorer attribute types.

Type Description
Text Displayed as a textbox. The width of text box is determined by the Field Size property of the field with a maximum width of 80 characters.
Memo Displayed using a text area with 5 rows and 60 columns.
Integer Displayed using a text box.
Float Displayed using a text box.
DateTime Displayed using a text box. Dates will be displayed in the format defined under the Regional Settings of the server machines Control Panel.
Currency Displayed using a text box.Currency values will be displayed in the format defined under the Regional Settings of the server machines Control Panel.
Boolean Displayed using a check box.
Node A field is of type "Node" if it serves as a foreign key to another view.  It will be displayed as a drop-down list box. See Creating Drop-Down List Boxes for information about creating a drop-down list box to view and edit a field's value.
Object Binary fields are treated as Object fields.  Using Gatsby Object Linking and Embedding  files can be uploaded and attached to the field.
Hyperlink Displayed as an actual HTML hyperlink. Gatsby does not allow for editing hyperlinks.

Default Values

If you specify a default value in your database design, the field will automatically populate with that value when a new record is created.

Validation

Both field and table type validations are enforced when interacting with the database through Gatsby Database Explorer.   When a form is saved with values that fail validation, the form will be re-displayed with the defined error message and the offending field highlighted.

Creating Drop-Down List Boxes

Native Lookups

This feature is only available for Microsoft Access databases.  If you’ve defined Lookups in Microsoft Access, Gatsby Database Explore will build a drop-down list box using those settings.  For Gatsby Database Explorer to recognize them Display Control must be set to "List Box" or "Combo Box" with Limit to List set to true.   This feature works with both "Table/Query" and "Value List" type lookups.

Auto-Lookups

Gatsby Database Explorer will automatically provide a drop-down list box for fields that are configured as foreign keys in your database design.  Relationships must be implemented with a single field.  Alternately you can define the field to be a foreign key using the Key To settings in the Gatsby Design Assistant.

In the following example there is a relationship between Manufacturers and Models. This relationship represents enforcement of the business rule that each Manufacturer may manufacture one or more Models of product. Conversely, it enforces that each Model is manufactured by one and only one Manufacturer. This relationship was drawn from the Primary Key of the Manufacturers table, Id, to the Foreign Key in the Models table, Manufacturer.

Gatsby Database Explorer will recognize this relationship and create a drop-down list box for the Manufacturer field in the Models form that contains a list of the Manufacturers from the Manufacturers table.

Gatsby Database Explorer determines which set of fields will serve as the caption for each row in the drop-down list by examining the index structure of the table The preferred index will be unique, non-primary and contain text fields. It then uses the fields of that index to build the row caption.  Row captions can also be explicitly defined using the Gatsby Design Assistant.

If the field is not required, the list box will contain an item called "<none>" which corresponds to a null value.

If a foreign key value that does not have a corresponding entry in the foreign table the value will be set to "<unknown>".

Since queries and views don't have indexes, Gatsby uses a different technique. First Gatsby will see if it can impersonate the source table of the primary key field. If all of the fields are available from the source table it will use them as the describing fields. Otherwise, it will use the first field in the query that is not part of the primary key.

Microsoft Access does not allow relationships in which queries participate to be enforced, therefore the cardinality is not specified. The same is true for relationships to a linked table. Gatsby assumes the cardinality of these relationships to be one-to-many in the direction that the relationship is drawn. To properly draw the relationship, start from the primary key and end with the foreign key.

Detail Section

The detail section provides three different ways for you to view and navigate to records that are related to the master record.

Showing Related Items

The Related Items section of the Form View lists the non-dependent relations between other valid Gatsby tables and queries and the current table or query where the current table is on the many end of a one-to-many relationship.

Once you have created the relationship, you can navigate to the Form View of a Department in Gatsby and see an entry for the relationship in the Related Items. You may have to open up a new browser session to view the new relationship.   Relationship names provided by the database are generally not very meaningful to the end user.  You can provide a user-friendly name for the related item on the Key To tab of the attribute.

Building Sub-Forms

Sub-Forms are similar to Related Items, with the single exception that the relationship is dependent.  A relationship is dependent if it has been setup as "cascade-delete" in the database or explicitly defined as dependent in the Gatsby Design Assistant.

Building Grouped Fields

Grouped fields are the product of one-to-one, dependent relationships between two tables. One-to-one relationships are a convenient mechanism for adding fields that may not apply to every record in the table.  A relationship is one-to-one if the primary key of a table is also a foreign key to the related table.

For instance, in the intranet sample the table Staff represents all of the people that work for the company. However, some of the people are contractors and others are employees. The system stores information about employees that it does not for contractors and vice-versa. Also, employees are allowed to participate in certain relationships that contractors are not.