Go to the first, previous, next, last section, table of contents.


Record-editing

This chapter describes how to add, change, delete, and browse records of a database table.

Active object

MUIbase uses a cursor for displaying which object is the active one. If the active object is a string object then a normal block cursor appears, other objects get a special frame around them. You can cycle through the active objects by pressing the Tab or S-Tab keys.

The table in which the active object resides is called the active table. The panel of a table can be set to the active object. This ensures that you can always set a table to be the active one, although the table may not contain any other activate-able objects.

Adding records

If you select menu item `Table - New record' a new record is allocated in the active table. The record is initialized with the initial values for all attributes. It is also possible to duplicate the current record of the active table by selecting menu item `Table - Duplicate record'.

Changing records

To change the current record in a table you can activate any attribute object within the table's mask and enter a new value. For string, integer, real, date, time, and memo attributes you can use the usual editing commands.

An attribute object may have been configured as read-only. In this case you can't change its value (exception: string attribute with pop-up button).

String attributes with pop-up button

If a string attribute has a pop-up button attached to it then you can press the pop-up button and get a requester to set the string contents, e.g. a file-requester for choosing a filename, or a list of strings to choose one from. The pop-up button can always be used to set the string attribute's value even if the attribute is set to read-only.

Right to the string field a `V' button might appear. Pressing this button calls an external viewer to display the file specified in the string field.

Entering bool values

The checked state of bool attribute can be toggled with the left mouse button, or with the space bar if the object is the active one.

Entering choice values

For choice attributes you can choose a value by clicking onto it, or by using the Cur-Up and Cur-Dn keys to browse through all choice labels.

Entering date values

Date values can be entered in the format `DD.MM.YYYY' where `DD', `MM' and `YYYY' are standing for two and four digit values representing the day, month and year of the date respectively. It is possible to omit the year value of a date. In this case the current year is appended to the input string.

By inserting a single integer value, a date value relatively to the current date can be specified, e.g. when entering `0' the today's date is used, or when entering `-1' yesterday's date is used.

Entering time values

Time values can be entered in the format `HH:MM:SS' where `HH' is a two digit value in the range of 0 to 23 representing the hours, `MM' a two digit value in the range of 0 to 59 representing the minutes, and `SS' a two digit value in the range of 0 to 59 representing the seconds.

It is possible to omit the number of hours and the number of minutes. In this case a value of 0 is used. E.g. if you enter `6:30' it is automatically expanded to `00:06:30'.

Memo context menu

Memo attributes have a context menu that offers further editing possibilities:

Entering reference values

For reference attributes there are several options to enter a value:

Entering NIL value

To enter the NIL value enter any invalid string for the given attribute type, e.g. if you enter `xyz' in an integer attribute then the value of this attribute is set to NIL. Please note that not all attribute types support the NIL value. See section Table of attribute types for an overview of all attribute types.

Deleting records

To delete the current record chose menu item `Table - Delete record'. Before deleting the record a safety requester may appear asking you for confirmation. You can enable and disable this requester in the preferences settings (see section Record delete requester).

Browsing records

To view other records than the currently displayed one, select one of the sub menu items in menu item `Table - Goto record'. You can go to the previous, next, first, or last record, jump several records backward or forward, or enter the record number of the record you want to view. The record number in this context is the number that is displayed in the corresponding panel for that record (see section Panels). The panel may also include two arrow buttons for going to the previous and next record.

Record browsing can be easily done using the CurUp and CurDn keys in combination with the Shift, Alt, and Ctrl keys. All possible combinations are listed in menu item `Table - Goto record' and in the following table:


         Alt               Ctrl-Alt          S-Alt

CurUp    Previous record   First record      Jump backward

CurDn    Next record       Last record       Jump forward


Go to the first, previous, next, last section, table of contents.