Managing database fields and tables |
The Database Explorer pane enables you to add, delete, re-arrange and rename fields, tables and folders. You can use the Copy/Paste commands, the drag-and-drop functions and the commands available via the context menu (displayed after right-clicking the explorer pane).
Dropping the dragged table over a folder places the table at the end of the table list in that folder.
Dropping a field over the table places that field at the end of the field list.
To rename any tree item, select it, then click it or use the Rename command from the context menu.
The Display Field Name With command toggles on/off displaying optional additional field information: the field type, its status ("calculated", "validation", "conversion", "default value") and whether the field is currently filtered.
To display the Field Setup dialog box, double click a given field in the Database Explorer pane or click that command on the main menu or the context menu. The dialog box offers the following options:
Field name
Any string starting with a letter and containing up to 63 characters.
Field names should be unique within a given table as otherwise formulas referring
to record fields may produce incorrect results.
Field type
One of the available four field types: "Text", "Numeric", "Long Text", "Files/Images" and "Code".
For details, please see: Creating new databases
Changing an existing field type may result in conversion and/or modifying the existing
field contents.
Special
This value specifies whether the field features some additional functionality.
Calculation formula - the specified formula
will be used to calculate the current field value automatically.
Calculated fields display calculation results only and can not
be edited. They are updated in the following situations:
Creating links between two tables is a special case of using calculated fields
and the vLookUp_ex function from the Cross-table summarizing & lookup formula category.
It behaves similarly to the standard spreadsheet vLookUp.
For example, see the included "sample.zip" database and the calculated fields
used to perform calculation on record fields and to link the "products" and "orders" tables.
For more information about the formula syntax, see: Entering formulas.
Validation formula or regex - the specified formula or a regular expression
will be used to validate data entered in this field. The data is accepted
if the validation formula returns a numeric value other than 0/false or if the regex matches the entire string.
For example, if some field ("field_1") should contain only strings at least
4 characters long, you can specify the following formula:
=len(field_1) >= 4
For more information about the formula syntax, see: Entering formulas.
Conversion formula - the specified formula or a comma-separated pair of the find-and-replace
regular expressions will be used to convert data entered in this field.
For example, to ensure that the entered data doesn't contain leading
spaces and first letters in words are uppercase letters,
the following formula can be used:
=proper(trim(field_1))
For more information about the formula syntax, see: Entering formulas.
Default value - a fixed value that is inserted into
selected empty fields after choosing the Insert > Default / Incremented Max (Ctrl+T)
command.
Also see: Default field values.
Incremented Maximum - the current (or initial) field maximum value is incremented by 1 and inserted into selected empty fields after choosing the Insert > Default / Incremented Max (Ctrl+T) command. The field must be numeric or must contain date/time values.
Statistics
Calculates the breakdown (field value/number of occurrences) for a given field.
The generated sorted list has a form of plain text so it can be selected and copied
on to the Clipboard. This and much more advanced functionality is provided
by Pivot Tables.
Formulas
Lists all predefined GS-Base functions that can be used in formula expressions in database fields. Database fields are referenced in these expressions by names.