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.

Two Ways to Edit

There are two ways to edit tables in Manifold: with preview or without preview.   

 

 

Example: Edit without a Preview

We begin with a simple table:

 

 

Double-click into a cell to begin editing it.

 

 

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

 

 

To accept edits into the cell we press Enter.   To move quickly to another cell we can press the right-arrow key twice.  That will move the current cell cursor two columns to the right.

 

We press Enter to begin editing the new current cell.  

 

If we were in more of a mouse-action mood we could have double-clicked on that cell to begin editing it.   However, sometimes when keyboarding many edits it is easier and faster to keep our fingers on the keyboard and not to move away 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.

 

 

Again, we make whatever edits we wish.

 

 

When done making changes we press Enter to accept edits into the cell.

 

 

Edits are immediate when editing without a preview.

 

Example: Edit with a Preview

Editing with a preview allows us to edit multiple cells at once in the same record before committing edits to all cells at once.   This allows us to edit records where multiple fields must be edited at the same time to satisfy constraints.  It also allows us to abandon an edit without changing anything in the database, which could be a very useful safety measure when editing very important databases.

 

Editing with a preview:

 

 

Blue 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 start with the same table.

 

 

 

We Alt-click anywhere in the desired record row, to pick that record.

 

 

A triangle pointer symbol appears in the record's row handle.   The triangle symbol indicates that record has been picked for preview editing.

 

 

The picked record also appears in the Info pane Values tab.    We can edit the record either in the Info pane or in the table window.

 

 

Since we Alt-clicked onto the Last Name field to pick the record, the table cursor will be on that cell and we can open it for editing by simply clicking the cell or by pressing Enter.   If we had Alt-clicked onto a different cell to pick the record, we could open the Last Name field for editing by double-clicking it.

 

We make the edits we want and then press Enter to accept the edits into the cell.

 

 

The edited cell appears in blue preview color.  We double-click into another cell in the same record to begin editing that field's text.

 

 

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

 

 

As we edit the row in the table window, changes we make are updated to the Info pane.  The second edited cell also appears in blue preview color, both in the Info pane and in the table window.

 

If we made the edits in the Info pane, the record in the table pane would be updated automatically as well.

 

 

So far the changes we have made to two fields in the record are temporary, as indicated by the blue preview color.   We can abandon the edits to both fields by clicking onto a different record's row handle, by starting to edit a different record or by pressing Ctrl-Backspace.   We can commit the edits to both fields by pressing Ctrl-Enter or by pressing the Update Record button in the Info pane.    Pressing Ctrl-Enter commits edits to all fields that are previewed in blue color.

 

We press Ctrl-Enter.

 

 

The temporary blue preview 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.

 

Changing a Cell's Value to NULL

The use of NULLs in databases is constrained by the peculiar nature of NULL values.   Manifold provides a fast and easy way of putting a NULL into a cell.  

 

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.

 

We right-click on the cell to pop open the context menu for cells.

 

 

In the context menu we choose Delete.  

 

 

Immediately, a NULL value is entered into the cell.    If we had first clicked the row handle to put the cell into preview editing mode, the NULL would have appeared in blue preview color.  In that case, we would press Ctrl-Enter to commit the edit.

 

Note that choosing a different row automatically unpicks any previously picked row.

Abandoning Edits

When we pick a record with Alt-click, so long as edited cells are shown in blue preview color we can abandon the changes made to those cells and to restore there contents exactly as they were before we edited them.  Once edits are committed with a Ctrl-Enter and the cells are no longer shown in blue preview color, we cannot undo the changes.

 

When more than one field in a record has been edited and is shown in blue preview color we can either abandon all edits to all of the fields at once, or we can abandon edits to one specific field.

 

Consider the example below where we have Alt-clicked the third record, and then we have made changes to the Last Name field, the First Name field, and the Title field.   All three cells are shown in blue preview color as having pending edits.

 

 

We can abandon the edits to all three fields at once by clicking onto another record's row handle, by editing another record, or by pressing Ctrl-Backspace.

 

 

Immediately, the contents are restored to their previous values.

 

 

Suppose instead we just wanted to abandon edits to a single field, for example, the edits made to the First Name field.  We right-click on that field to call up the context menu.

 

 

When there are changes that can be abandoned in a cell the context menu acquires an additional Undo Changes choice.   We click on that.

 

 

 

The result is that edits are abandoned only for the First Name field.   Changes made to the other two fields are still pending.  To commit those edits we press Ctrl-Enter.

 

 

Or, for a change of pace, we can press the Update Record button in the Info pane.

 

 

The changes are committed and the fields are shown with white background, both in the table window and also in the Info pane.

 

 

To unpick the record, if we like, we press the Esc key.

 

 

Notes

Editing Fields with Long Text - To edit fields with long text we use the Edit dialog, as seen in the Example: Edit Attributes and Move a Point and the Example: Edit Attributes, Larger Text, IME for Asian Languages topics.  Those examples use the Info pane but editing cells with long text in tables is exactly the same.

 

Unicode and Other Languages - For advanced Unicode editing and entry of various languages Manifold's cell editing in tables is fully Input Method Editor (IME) enabled.  See the Example: Edit Attributes, Larger Text, IME for Asian Languages topic.

 

See Also

User Interface Basics

 

Tables

 

Editing Tables

 

Info Pane

 

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.   

 

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.

 

Example: Edit Attributes and Move a Point - We look at the attributes for a point in a drawing layer and edit one of the attributes using a more expanded Edit dialog.  We then move the point to a new location. Easy!

 

Example: Edit Attributes, Larger Text, IME for Asian Languages - A tour showing how to edit attributes in a drawing using the Info pane Values tab and the expanded Edit dialog, including advanced Unicode facilities and use of the built in Input Method Editor (IME) to input text in Japanese language.

 

Videos

Manifold Future - Future Tour Part 4 Edit Attributes, Move a Point - We use Manifold Future to see how to view attributes of objects in drawings, including use of the new Edit dialog to view long, multi-paragraph text fields.  We edit fields and see how easy it is to preview edits and either accept them or abandon them. We switch to editing the geometry of objects in a drawing, viewing the coordinate locations and using mouse moves to reposition points. We edit the location of a point to correct an error in a drawing, using Google Satellite view to provide context for the correction.  Fast and easy, with previews all the way!

 

Manifold Future - Future Tour Part 5 Unicode Attributes and IME -  We take a tour through Manifold Future attribute editing, showing how to edit attributes in a drawing using the Info pane Values

tab and the expanded Edit dialog, including advanced Unicode facilities and use of the built in Input Method Editor (IME) to input text in Japanese language.