Please review the Getting Started, User Interface Basics, Tables and Table Windows and Big Data topics before proceeding with this topic.
This topic discusses interactive editing of tables by editing cells in one record at a time. Edits in tables can also be accomplished on many records at a time using a combination of the Select pane, to select the records to be edited, and the Transform pane, to apply edits using a very wide variety of transform templates. Tables can also be edited using queries. The Edit - Join dialog can add new fields to a table and populate them with data from a different table.
Choose File - Create - New Table, or use the context menu in the Project pane.
Specify a Name for the new table.
Press the Edit Schema button and use the Schema dialog to add fields and indexes and computed fields as desired to the table.
Press Create Table.
We can easily create tables as in the above, but most often the tables we work with are created as a result of importing or linking data, either tables or drawings or images, or they are created by SQL we write.
Edit the structure of a table, adding or deleting columns, indexes or constraints, using the Edit - Schema dialog.
To be editable tables must have an index and they cannot be read-only. If a table has a light gray background in all of the columns it is not editable. Having an index is a good idea in any event because it makes work with tables faster and it enables facilities like interactive selection. To add an index to a table that does not have an index, see the Add an Index to a Table topic.
Tables in Manifold usually will have an index but quite often they may be linked in from read-only data sources that do not allow any changes. For example, we may be able to view tables in an Oracle or PostgreSQL database hosted on a remote server but it could be that the IT department in charge of that server does not allow us to make any changes to tables.
Manifold automatically creates an index as necessary when importing tables into a project from many spatial data sources used in GIS work, for example, when importing a drawing. When we import data from sophisticated non-spatial data formats, such as a database, we usually get a table with an index as well, since DBMS people routinely will include indices for performance in their native database systems. Manifold of course will import and will utilize those indices along with the rest of the schema and data.
But if we import a table from a simple "data only" format like CSV where indices do not occur, then Manifold will not automatically add an index, in respect of keeping the data exactly as is in the original form. In that case when we pop open the table we will see it with gray background color that indicates it cannot be edited. That is not a big deal since adding an index is trivially easy: See the Adding an Index to a Table topic for the step by step procedure. See the Notes at the end of this topic for other unusual situations when we might be surprised to see that a table is not editable.
We can edit tables using dialogs and menu commands to do things like change the schema of a table, use SQL queries to alter the structure of tables and the data within them or we can edit tables interactively using mouse and keyboard within a table window. This topic discusses interactive editing within a table window. Interactive editing of tables usually only makes sense for relatively small tables as it is neither convenient nor realistic to edit tables by hand when they contain millions of records.
Table windows allow us to look into a table. They provide interactive browsing capability by fetching data from the table to display. When we interactively edit data shown in a table window, such as by double-clicking into a cell and changing the value, we are working with the table window as an intermediary to the table. We can either make an immediate edit to a cell or, if desired, put the entire row into edit mode so that edits to cells are temporary until all edits to the entire row at once are committed. That allows us to make changes in the window's data, one record at a time, before we decide to commit those changes to the table.
Default actions, such as clicking the Enter key to begin editing a cell, will apply to the current cell, which is marked by a dotted line box called the cursor
Tables use background colors to call out the status of different fields and records. These visual cues also help editing.
Gray background indicates fields that are read-only. When an entire table is read-only, because it does not have an index or because it comes from a read-only data source, all of the fields in the table will have gray background color.
Red indicates selected records.
Blue color indicates records that are being previewed by a dialog such as the Select pane.
Blended color indicates selected records that are also being previewed.
Blue cell background color within a single record that has been edited shows a preview of temporary edits that have been made but not yet committed.
In addition to native Manifold commands, Manifold also incorporates Excel-style cell editing to open cells for editing. There are various ways to open a cell for editing, to insure the most convenient way is always available. All these actions depend on the table window having the focus.
Double-click - Clicking the left mouse button rapidly twice on a cell opens it for editing. If the cell contains text on a single line that is less than 1024 characters, the cell opens "in place" for editing. If the cell contains multiple lines or more than 1024 characters, the Edit dialog pops open to allow more convenient editing of lengthy text.
Enter on cursor - When the table cursor is already on a cell, pressing the Enter key opens that cell for editing, just like a double-click.
Click on cursor - When the table cursor is already on a cell, clicking that cell opens it for editing, just like a double-click. This is a classic Excel move.
Repeat-click - A repeat-click is a click on a cell followed by a pause, followed by another click on that cell. The first click moves the cursor onto that cell and the second click opens the cell for editing, just like a double-click.
Right-click - Right-clicking a text cell and then choosing Edit launches the Edit dialog to edit that cell. For non-text cells, it is quicker to double-click the cell to open it for editing.
Alt-click - Alt-clicking a cell picks the entire record for display in the Info pane. We can then also edit the record's cells in the Info pane. Alt-clicking a cell in a record also picks that record for provisionary row editing.
Manifold provides two options for editing the contents of cells in tables:
Immediate cell editing - Double-click into a cell to edit it and then press Enter and the edit will take effect immediately. We can also right-click onto a cell and choose from the context menu, to Paste from the Clipboard, to Delete to put a NULL in the cell, or to Edit the cell in a pop-up Edit dialog. When finished editing, the edits will take effect immediately. A click onto a cell already picked with a prior click will also open it for editing.
Provisionary row editing - Alt-click the row handle or any cell in the record to mark the entire record for provisional editing: a triangle pointer symbol will appear in the row handle. Any edits to any cells in the row will all be temporary and will be shown in blue preview color until we click on the row handle again or we Ctrl-Enter to commit the edits. Provisionary editing allows us to make changes in multiple cells before committing the edits. That allows edits in different cells to be all be done at once in a compatible way, if that is required by any constraints requiring specified relationships between multiple fields.
Any provisionary changes we make to a record within a table window that are shown with blue background color are temporary until we command the table window, with a Ctrl-Enter or a click on the row handle, to commit those changes by dispatching them to the table. Cells shown with blue background color have changes that can be abandoned. Cells with normal, white background that have been edited have had their changes already committed to the table.
If desired, we can change the preview color used by Manifold in the Tools - Options dialog. This allows us to use a color different than blue color for provisional edits.
Add a new row to a table by double-clicking into the last row, marked with a * asterisk in the row handle, and adding info into cells. Press Ctrl-Enter or click the row handle to commit the new record. Adding a new record is always a provisionary edit.
Double-click any cell to open it for editing.
Edit the cell as desired.
Press Esc to cancel editing or press Enter to finish editing the cell. Done.
Double-click into any cell to open it for editing. A click onto a cell already picked with a prior click will also open it for editing.
Edit the cell as desired and then press Enter.
Done. Edits take effect immediately.
Alt-click the row handle or any cell in the record. A triangle pointer symbol will appear in the record's row handle to indicate that record is being edited.
Double-click the cell to be edited, or just click it if the cursor is already on the cell, to start editing the cell.
Edit the cell as desired. Press Esc to cancel editing or press Enter to finish editing the cell. The cell background will change to blue to indicate it has been edited.
Edit any other cells in the record as desired, pressing Enter to finish editing each cell.
To commit the edits for the record, click the triangle pointer symbol in the record's row handle or press Ctrl-Enter.
To abandon the edits, click on the row handle of any other record, double-click into the cell of any other record or press Ctrl-Backspace. We can also right-click onto the record we have temporarily edited and choose Undo Changes.
Alt-click onto the row handle for the record to be edited, or Alt-click onto any cell in the record. That picks the record for provisional editing and marks the record with a triangle pointer symbol in the record's row handle.
Double-click the cell to be edited, or just click it if the cursor is already on the cell to open the cell for editing.
Edit the cell as desired and then press Enter. The changes will be previewed in blue preview color. Seeing a triangle pointer symbol in a record's row handle or seeing blue color in a record's cells tells us that edits have been made in that record which have not yet been committed
We can commit the edits by clicking the triangle pointer symbol in the record's row handle, or...
...by pressing Ctrl-Enter.
If we want to abandon
the edits we can right-click onto
the record and choose Undo Changes,
we can press Ctrl-Backspace, we
can click on a different
record's row handle or we can begin editing a different record by double-clicking into a cell,
in which case all uncommitted prior changes will be discarded and the
previously edited record will revert to the original, unedited content
Only one record at a time may be edited provisionally, but we can edit multiple fields in the same record before deciding to commit all previewed edits or abandoning them. If we want to abandon previewed changes for only one field we can right-click onto that cell and choose Undo Changes.
This makes it possible to edit records where more than one field must be edited at the same time in order to satisfy constraints, as shown in the Example: Create a Table with a Constraint topic. For example, a table of records representing travel information may require that the departure date for a hotel reservation be later in time than the arrival date for that reservation.
We can also use the Edit dialog to edit text in a table cell.
Right-click the cell to be edited and choose Edit.
That opens the cell's text in the Edit dialog. We can resize the Edit dialog to make it wider or narrower, or taller or shorter as desired.
The Edit dialog makes it easy to enter text that is too long to conveniently show in a table cell or which consists of multiple lines.
Multiline text will appear in the table with an ellipsis ... sequence of three dots to indicate the entire text does not fit into the room available in the cell.
Double-clicking into a cell with multiline text will also automatically launch the Edit dialog.
See the Example: Editing Records in a Table topic for a step by step example of editing records.
For examples using the Edit dialog, see 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.
To manually set the value of a cell to <NULL>, right-click onto the cell and choose Delete.
If a table supports adding records the table window will display an editable, blank, template record at the end of the table, marked with an asterisk * character in the row handle. To add a new record we edit the blank record, double-clicking into one of the record's cells to begin editing.
The asterisk * character in the row handle changes to a triangle icon in the row handle when we make edits to the blank, template record. We commit changes to the edited template record by clicking the triangle icon or by pressing Ctrl-Enter.
Committing the changes will add a new record to the table, a new value for mfd_id will automatically appear in that field for the new record if that field is used, and a new, blank, template record marked with an asterisk * in the row handle will appear at the end of the table.
See the Example: Adding Records to a Table topic for a step by step example of adding records.
We can insert records into a table by pasting records, using Edit - Paste or Ctrl-V, that have been copied or cut from another table window (using Edit -Copy, Edit - Cut, or Ctrl-C or Ctrl-X), or from another drawing or drawing layer in a map window.
Pasting with Edit - Paste or Ctrl-V automatically matches field names from the source drawing or table to the destination drawing or table, automatically iterating mfd_id values to avoid collisions between pasted records from the source table that originally had the same mfd_id value as existing records do in the destination table. If field names do not match, the Paste dialog will automatically be launched To allow mapping contents from one field name to a different field name.
Pasting with Shift-Ctrl-V calls up the Paste dialog even if all field names match. In the Paste dialog, click into a cell in the right-hand column and in the pull down menu choose ignore Field to paste objects with a NULL value in that field. Choosing ignore Field for the special mfd_id field will automatically create new, unique mfd_id values, avoiding any collisions in mfd_id values with existing records. The pull down menu will also allow us to map different source fields into destination fields.
Pasting records will use the table field style for each field that is used by the destination table.
We can also create a new table in the Project pane by pasting records or objects copied or cut from a table, a drawing or a drawing layer in a map window. Copying records from a table or objects from a drawing and then pasting into the Project pane creates a table that is the same name, with an added number to iterate the name, as the source table or drawing's table.
See the Copy and Paste between Drawings or Tables topic for examples.
Ctrl-A |
Select All |
Shift-Ctrl-A |
Deselect All |
Ctrl-I |
Select Inverse |
Ctrl-X |
Cut |
Ctrl-C |
Copy |
Ctrl-V |
Paste |
Shift-Ctrl-V |
Paste launching the Paste dialog |
Delete |
Delete |
If a table supports adding new fields we do so in the Edit - Schema dialog. See the Example: Add a Computed Field to a Table topic for a step by step example of adding a new field.
Table windows also allow us to edit the values for existing fields by choosing the Transform command in the context menu raised by right-clicking on the column head of an existing field.
In provisionary editing, Manifold allows us to edit as many cells as we want in the same record and to then abandon those edits. That provides a level of "undo" not available in all database systems. In addition, while we are editing a record, after we have double-clicked into the cell but before we have pressed Enter to close the editing session in that cell, we can right-click into the cell and choose Undo to abandon edits made since we double-clicked into the cell.
Important: Either in immediate cell editing or once an edit to a record has been committed with a Ctrl-Enter in provisionary editing, the edit is permanent and cannot be undone. Like almost all database systems there is no "undo" after edits to records have been committed in Manifold.
If we want to browse data sets without any risk of making permanent edits we can do so by checking the Open as read-only option box in the New Data Source dialog to add them as a read-only data source.
Right-clicking onto a cell calls up a context menu that automates many common tasks:
Add Filter |
See the Filters topic. One-click process to add a filter based on the value of that cell. |
Undo Changes |
Enabled only for all cells shown in blue preview color. Abandon edits that are being previewed. |
Copy |
Copy the entire contents of the cell to the clipboard. This is a useful way to copy lengthy text from a cell onto the clipboard without having to open the cell for editing. |
Paste |
Paste the contents of the clipboard into the cell. |
Delete |
Delete the contents of the cell, which creates a <NULL> value in the cell. |
Edit |
Enabled for cells containing text. Launch the entire text contents of the cell in an Edit dialog. |
Copy to Selection |
Appears for selected records. Copy the value of this cell to that field for all selected records. Keyboard shortcut: Ctrl-F2 |
Ctrl-F2 |
Copy contents of the selected, context cell to all selected records. A keyboard shortcut for Copy to Selection. |
The right-click context menu on a cell is a fast and convenient way of copying the entire contents of one cell into another cell. See the Manifold Future - Future Tour Part 6 Cell Context Menu video for an example.
<gray background> |
Values shown with gray background are read-only and cannot be edited. |
Click |
Put the table cursor onto a cell. A second click onto a picked cell will open it for immediate editing. |
Double-click |
Open a cell for immediate editing. |
Enter Ctrl-Enter |
Enter to open the current cell for editing, or double-click into a cell. Enter closes the cell for editing, leaving it in blue preview color until a Ctrl-Enter commits the change. |
Esc |
When edits are in process, pressing Esc closes the editing session without applying changes. |
Ctrl-backspace |
Abandon all edits for all cells shown in blue preview color. To abandon edits for only one cell shown in blue preview color, right-click onto that cell and choose Undo Changes. |
Ctrl-click |
Ctrl-click anywhere in a row to toggle the selection status of that record. |
Ctrl-click-and-drag |
Ctrl-click and drag a selection box to add to the selection all rows that are touched by or are within the box. |
Alt-Ctrl-click-and-drag |
Alt-Ctrl-click and drag an unselection box to remove from the selection all rows that are touched by or are within the box. |
Arrow Keys |
Move current cell cursor up / down / left / right. |
Home |
Move current cell cursor all the way to the left-most column. |
End |
Move current cell cursor all the way to the right-most column. |
Ctrl-Home |
Move current cell cursor to the top of the table. |
Ctrl-End |
Move current cell cursor to the bottom of the table. |
Page Up Page Down |
Move current cell cursor up or down one display page's worth. |
Cell context menu |
Right-clicking onto a table cell calls up a context menu:
|
Scroll bar |
A vertical scroll bar appears when there are more records than can fit into the window. Scrolling the display does not move the current cell cursor. |
Scroll bar clicks |
Clicks in the scroll bar region:
|
Scroll bar context menu |
Right-clicking onto the scroll bar calls up a context menu:
|
While editing a text value in a cell or within the Edit dialog, a right click calls up the following context menu:
Undo |
Undo changes made so far in the editing session. The ability to undo goes away as soon as we close the editing session. |
Cut |
Copy highlighted text to the clipboard and delete the highlighted text. |
Copy |
Copy highlighted text to the clipboard. |
Paste |
Paste text contents of the clipboard. |
Delete |
Delete highlighted text. |
Select All |
Equivalent to Ctrl-A. Highlight all text. |
Right to Left Reading order |
Display text right-aligned in order suitable for alphabets reading right to left. |
Show Unicode control characters |
Display glyphs at the locations of otherwise invisible Unicode control characters. |
Insert Unicode control character |
Insert a Unicode control character at the location that was right-clicked, by choosing from the long list of available characters in the list that appears. Unicode control characters guide the display of Unicode text for Unicode-aware applications. |
Open / Close IME |
Turn on or off Manifold's built in, Microsoft-compatible, Input Method Editor (IME) facility. IME works with IME-aware Microsoft languages that have been installed on our computer to enable entry of non-English languages, primarily various Asian languages. |
Reconversion |
Enabled when we right-click on highlighted text that was entered using the IME facility. Allows choice of a different conversion, for example, using katakana or kanji instead of hiragana text in Japanese. See the example topic noted below. |
For examples of use, including IME and Reconversion, see the Example: Edit Attributes, Larger Text, IME for Asian Languages topic.
The Copy to Selection command allows copying the value within a selected cell to that field in all selected records.
In the Products table we have selected all products with a Unit Price between 18 and 22 inclusive. We want to set the Unit Price for all selected records to 20. We Right-click on a cell that has 20 as the Unit Price.
In the context menu that pops open we choose Copy to Selection.
Instantly, the value 20 is copied into the Unit Price cells for all selected records.
The keyboard shortcut of Ctrl-F2, copies the value of the cell designated by the cursor to all selected records.
Suppose the table cursor is on a cell with a Unit Price of 18. Press Ctrl-F2.
That instantly copies the value of 18 into the Unit Price cell of all selected records.
Tech tip: Have we mentioned that tables are editable available only if there is a btree or similar index in a table? See the Adding an Index to a Table topic.
How to tell why a table is not editable? - Gray background in all of the fields of a table indicates all fields are read-only. There are three reasons why all of the fields may be read-only:
No index in the table - The Info pane or the Schema dialog will show if a table has an index. It is easy to add an index to a table.
Read-only data source - A data source that has been created read-only will have a small black lock symbol on the yellow cylinder icon for the data source.
All fields are read-only computed fields - Computed fields are read-only. It would be rare to encounter a table where all fields are computed fields. We can tell if a field is a computed field by hovering the mouse above the column head to see what type it is. If it is a computed field the expression used will appear in the tooltip. We can also launch the Edit-Schema dialog, click on the field in the Schema dialog and see what Expression is reported for the field.
Data sources might be read-only because they were created with the Open as read-only option box checked in the New Data Source dialog. However, some tables brought into Manifold from an external data source may be read-only because of access permissions or other security controls on the database in use, as a result of permissions or policies in the operating system or limitations of the connection to a remote database.
Deletions are Confirmed - Deleting records in a table window displays a confirmation dialog. The default button in the confirmation dialog is set to Cancel. If we do not want to see the confirmation dialog, we can check the Never show this again box. That will remove the confirmation dialog for deleting frames in layouts, for deleting objects in drawing layers, for deleting labels, and for deleting records in tables. Another way to eliminate the confirmation dialog is to uncheck the Confirm deleting records box in the Tools - Options dialog.
How to edit more than one record at a time? - To edit more than one record at a time we can use queries. We can also use the Copy to Selection feature, as described in this topic.
Copy to Selection - Copy to Selection is so fast that normally it is instant; however, when doing big Copy to Selection in tables within data sources that are connected through slow communications links or which are slow data sources, there might be time for a progress dialog to appear, which reports progress of the operation and allows it to be canceled, the data source permitting. The total time required for Copy to Selection is logged in the Log Window.
Copy to Selection and Delete commands disabled - Table windows will disable Copy to Selection and Delete commands for values in a field that belongs to an index used by the table as a key.
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.
Copy and Paste between Drawings or Tables
Example: Closing without Saving - An example that shows how File - Close without saving the project can affect local tables and components differently from those saved already into a data source, such as an .mdb file database.
Example: Editing Records in a Table
Example: Adding Records to a Table
Example: Add a Computed Field to a Table
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.
Manifold 9 - Copy to Selection - A short video showing how to copy the same, desired value to fields in all selected records. This is a great way to make changes to many records at once in a table. This technique is a life saver when making edits to tables. Works in the free Viewer, too.
The following videos show use of the Record pane (now known as the Info pane), but the editing moves they show are identical when applied to editing cells within tables.
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 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.
Manifold Future - Future Tour Part 6 Cell Context Menu - A short video showing a fast and easy way to copy between cells in tables using the context menu. Also... one step undo of pending changes, setting the value of a cell to NULL and more. The context menu on cells is such a simple thing but it makes repetitive editing of tables much faster and easier.