Example: Editing Records in a Table

This example provides a step by step procedure illustrating how to edit records in a table.   These are simple moves that become totally automatic after editing a few records.

 

The keys to understanding edits in Manifold are:

 

 

Blue-gray 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.

 

We begin with a simple table.

 

eg_editrec01_01.png

 

Double-click into a cell to begin editing it.

 

eg_editrec01_02.png

We make whatever edits we like.  If we change our minds we can press Esc to cancel editing the cell.

 

eg_editrec01_03.png

To accept edits into the cell we press Enter and then press the right-arrow key twice to move the current cell to the right two fields.

 

eg_editrec01_04.png

We press Enter to begin editing the new current cell.  

 

Instead of moving to a new cell by pressing the right-arrow twice and then pressing Enter we could have double-clicked on the cell to begin editing it.   However, sometimes when keyboarding many edits it is easier and faster to not move our fingers from the keyboard to use a mouse.  In such cases we can navigate with arrow keys and use the Enter key to commence editing a cell.

 

eg_editrec01_05.png

Again, we make whatever edits we wish.

 

eg_editrec01_06.png

 

We press Enter to accept edits into the cell.

 

eg_editrec01_07.png

 

So far the changes we have made to the record are temporary.   We can abandon edits by clicking onto a different record's row handle, by starting to edit a different record or by pressing Ctrl-Backspace.   We will commit the edits by pressing Ctrl-Enter.

 

eg_editrec01_08.png

The temporary blue-gray background color of the edited cells changes to white background to indicate the edits have been committed.  The triangle pointer symbol in the edited record's row handle is also cleared.

 

eg_editrec01_09.png

We will now edit another record, double-clicking into the cell to be edited, making the edits we want and then pressing Enter to accept the edits into the cell.

 

eg_editrec01_10.png

We double-click another cell in the same record to open it for editing.

 

eg_editrec01_11.png

 

After making the desired changes we press Enter to accept edits into the cell.

 

eg_editrec01_12.png

 

To commit changes to the record we press Ctrl-Enter

 

eg_editrec01_13.png

The blue-gray temporary background colors disappear as the edits to the cells are committed.  The triangle pointer symbol in the edited record's row handle is also cleared.

 

Changing a Cell's Value to NULL

The use of NULLs in databases is constrained by the peculiar nature of NULL values.   We deal with that when editing in Manifold by first creating a temporary edit, using some arbitrary value, to put the record into editing mode and then changing the value to NULL.

 

Let us assume that one of the employees, Janet, who is based in Los Angeles, has decided to stop using a last name.   We will put a NULL in the Last Name field for that employee's record.

eg_editrec01_14.png

 

We double-click on the cell to edit it.

 

eg_editrec01_15.png

 

We enter any temporary text we like and then press Enter.   There is absolutely no meaning to what we enter for the temporary text as we will immediately replace it with a NULL value.

 

eg_editrec01_16.png

We right-click onto the edited cell.

 

eg_editrec01_17.png

 

In the context menu that drops open we choose Set to NULL.

 

eg_editrec01_18.png

 

A NULL value appears with blue-gray temporary, uncommitted background color in the cell.   We press Ctrl-Enter to commit the edit.

 

eg_editrec01_19.png

 

The result is a table with a NULL value for the last name of the employee.

 

See Also

User Interface Basics

 

Tables

 

Editing Tables

 

Example: Adding Records to a Table - How to add a new record to a table using mouse and keyboard.

 

Example: Create a Table and Add a Record - Create a table with required fields and then add a record with value for those fields.  Creates the OGR-required table to prepare a Manifold project for use by OGR as detailed in the Example: Connect to Radian from QGIS topic.

 

Example: Create a Table and Add a Record - Create a table with required fields and then add a record with value for those fields.  Creates the OGR-required table to prepare a Manifold project for use by OGR as detailed in the Example: Connect to Radian from QGIS topic.

 

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.   We do that in two examples, first a very simple one and second, a more elaborate example that also shows restriction to a selection as well as use of the Transform dialog.

 

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.