New Column

Adding a column to a table can be performed by the “New Column” command found in the table’s context menu. The column can be added either at the level of data (new data will then be added to the table), or level of view (typically a column whose values are computed based on the other column’s values), or level of presentation (only a new manner of displaying present data is introduced). The level of insertion is chosen using the selection field located at the top of the column insertion window (see picture).

Notes

●
When inserting a column at the level of data, usually only the column name and data type has to be specified (other items can usually be left unchanged).
●
When inserting at the level of view, it is necessary to specify the column name. The data type should be left to “computed”, and the result data type should be set.
o
The expression is entered in the “Getter function” field.
o
If the “Setter function” is specified as well, the computed column can also be used to change table data.
o
In this specific case, a column is being inserted, which computes total price by the formula price*quantity.
o
The expressions are specified in the Enki language.
●
A column at the level of presentation defines only an item (a control) displayed in the column’s cells.
o
The cell data is accessed by the cell_data identifier from the control. The row data is similarly accessed by the row_data identifier.
o
In the example above, the “image label” control is used to graphically display the number of orders.
o
All the attributes of a control can be specified by an expression using the button. In this specific case, the image is computed by an expression, rather than specified as a static picture.
o
The controls are defined using the R-D/C presentation model.
●
A custom control can be specified even for columns inserted at the level of data or view by checking “custom presentation”.
●
The properties of an existing column can be edited analogically by the context menu command “Column Properties”.

Further Information

Further information on these topics can be found in the following chapters of the Reference Guide:
●
Enki language.