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:

 

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

 

eg_editrec01_04.png

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.

 

eg_editrec01_05.png

Again, we make whatever edits we wish.

 

eg_editrec01_06.png

 

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

 

eg_editrec01_07.png

 

When editing without a preview edits are immediate.

 

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.

 

eg_editrec01_08a.png

 

This time, we click onto the record handle for the first record.   A triangle pointer symbol appears in the record's row handle.   The triangle symbol indicates that record has been chosen for preview editing.

 

eg_editrec01_08.png

 

We double-click into the Last Name field for the first record.

 

eg_editrec01_09.png

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

 

eg_editrec01_10.png

 

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.

 

eg_editrec01_11.png

 

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

 

eg_editrec01_12.png

 

That second edited cell also appears in blue preview color.   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.   Pressing Ctrl-Enter commits edits to all fields that are previewed in blue color.

 

We press Ctrl-Enter.

 

eg_editrec01_13.png

 

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.

eg_editrec01_14.png

 

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

 

eg_editrec01_15.png

 

In the context menu we choose Delete.  

 

eg_editrec01_16.png

 

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.

 

Abandoning Edits

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 made changes to the Last Name field, the First Name field, and the Title field in the third record.   All three cells are shown in blue preview color as having pending edits.

eg_editrec01_17.png

 

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.

 

eg_editrec01_18.png

 

Immediately, the contents are restored to their previous values.

 

eg_editrec01_19.png

 

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.

 

eg_editrec01_20.png

 

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

 

 

eg_editrec01_21.png

 

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.

 

eg_editrec01_22.png

 

The changes are committed and the fields are shown with white background.

 

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 Record panel 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

 

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 Record panel 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 Record panel 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.