As well as the actual table as stored in the server database, Rekall can also store table design information such as default values and validation expressions. These are stored in objects with the .inf extension ( Prior to Rekall version 2.0.0, this information was stored in a table in the server database called __RekallDesign. The change allows for much more information to be stored; as with everything else in Rekall it is formatted as XML. If you have used a version of Rekall prior to 2.0.0, the settings will be automatically transfered to the .inf files. The __RekallDesign table is not deleted, in case you need to go back to it, but it will not be updated with any further design changes. ) . Note that these apply to data display and entry in table view; they are not passed to the server database and are not used when a form is created which accesses the table. The table below lists these:
Legend | |
Validator | Validation expression used when entering data. This is a unanchored regular expression. |
Ignore case | Case insensitive input validation |
Default value | Value to be used if none given |
Format | Data formatting for display. See below. |
Link | Display data from a linked table. See below. |
If you click in the Format or Link fields, then a small button will appear; clicking this will show a helper dialog which assists in setting an approproate value. Format setting is fairly straightforward, with the dialog showing appropriate types and sample formats. Numbers are formatted using C fprintf style format strings, while dates and times are formatted using strftime format strings. Please refer to an appropriate manual for further details.
The link setting needs more explanation. Suppose you have a column, say ClientID, which contains (foreign) key values which refer to clients stored in a table Clients, and you would like to display the client name rather than the key value.
To do this, the link setting would be something like Client:ClientID:Name, meaning to display the Name column from the Client table, where the ClientID value in that table is the same as the column value in this table. To make this easier, the helper dialog allows you to select the table to which to link, the column in that table which is matched to the (foreign) key column, and an expression to display. The screenshot below shows the Orders table; the ClientID and ProductID columns have been linked to the Client and Product tables, and the date columns have been formatted as dd-mmm-yy. Focus is in the ClientID column, so one row is showing a combobox.
One thing to note about linked table fields is that they appear as combo boxes when focus is in the field, but as plain text otherwise. This is an example of a morphed control. In fact, all controls in the table data view are morphed, although the difference is much less apparent for simple text fields. This is primarily done in order to make screen update sufficiently quick when there are a large number of columns in a table, or a large number of rows on display, however, the switch to and from a combobox can usefully save space on the display. Looking ahead once again, you can also morph some types of controls in any forms which you design; in fact, table data view is actually a perfectly standard Rekall form, although it is constructed on the fly to match the table.