This example provides a step by step procedure illustrating how to add records to a table. These are simple moves that become totally automatic after editing a few records. Manifold is often used with tables that are far too large to create manually. But Manifold is also used in situations where tables might be created manually by adding records with a keyboard and mouse.
The keys to understanding edits in Manifold are:
Blue preview color in the background of cells and a triangle pointer symbol in the record's row handle indicates the record has been edited but the edits have not yet been committed.
Our example uses a simple table that has only three records for three hypothetical employees giving the Last Name, First Name and Title for each employee.
We begin adding a record by double-clicking into any cell in the last row that is marked with an asterisk * character in the row handle.
The action of double-clicking into any cell in the last row opens the cell for editing and initiates a new temporary record that is populated with NULL values in the other cells. We will enter the Last Name of an additional employee.
We write the text we want into the Last Name cell and then press Enter to accept edits into the cell.
The new value for the cell appears in provisional blue color. The Info pane also pops open to display the pending record. We can edit the pending record either in the table window or in the Info pane. We will continue editing in the table window.
We press the right-arrow key to move the current cell one cell to the right to the First Name cell.
Press Enter to open the current cell for editing.
We enter the text desired for the First Name.
Press Enter to accept the edits into the cell and then press the right-arrow key to move the current cell one cell to the right to the Title field for the new record.
We press Enter to open the current cell for editing.
We enter the text desired for the Title field.
Press Enter to accept the edit for that cell.
If we abandon the edits no new record will be added to the table. Instead, we will now commit the edits to the record either by pressing Ctrl-Enter...
OR ...by pressing the Add Record button in the Info pane.
The edits are committed, a new record is added to the table and a new record handle with an asterisk * character appears to allow us to add more new records if we like. Note that a new value of the mfd_id field has been automatically added as well. The mfd_id field is special in that Manifold knows to automatically add a unique value to the field to support the use of the mfd_id field as the basis of the index for the table.
User Interface Basics
Example: Editing Records in a Table - How to edit the contents of an existing record using mouse and keyboard.
Example: Add a Field to a Table and Fill It - we add a field to a table and simultaneously for all records fill the field with a specified value.
Example: Add a Computed Field to a Table - In this example we add a field to a table. We first set the values for a field dynamically with a computed field using the Add Computed Field option in the New Field dialog. We then illustrate what happens when we fill a field statically with values using the Add Field option. Last, we show what the Add Component choice does in the New Field dialog.
Example: Create a Table with a Constraint - Create a simple table that includes a simple constraint upon one of its fields.
Adding an Index to a Table - A basic topic on adding an index using the built-in capabilities of the mfd_id field.
Example: Add a Spatial Index to a Table - A typical use of an index is to provide a spatial index on a geom field in a table, so the geom data can be visualized in a drawing. This topic provides the step by step procedure for adding a spatial index.
Example: Add a UUID-based Index to a Table - Create a new computed field that is filled with UUID values on creation and then create an index on that field. This technique creates an indexed field that has guaranteed unique values for all records and thus the indexed field and record values may be used in other projects.