☰ Docs map

Reference columns

To define a reference column, you need to select the target of the reference, which can be another (or the same) column or view. But you may as well set a few additional parameters described below.

Properties of reference columns

Vtable

Target of the reference. It can be a table or a view.

Allow to delete with parent

By default you cannot remove a record which is a target of a reference of other record (in any table). If you enable this option, such cascade removal become possible.

Definition of a reference column

Allow add via popup

Unless this option is checked a user may select only form existing records when filling a reference field. Enabling this option will let the user to open a new popup window in which a new target record can be created.

Add new record as a reference option

Suggestions

Suggestion subsection of the reference let you to automatically copy some values from reference target record to the corresponding fields of currently edited record. This behavior can be very useful in specific situations.

For example you have table with articles, containing columns "Price" and "Unit". In another table (call it "Orders") you have a reference to an article column ("Article"), a "Quantity" column, an expression column taking the price ("Unit price") of an article and another expression column calculating the total value of order based on "Quantity" and "Unit price".

The above solution will work fine as long as you don't change the price in the "Article" table. Such modification would cause the change of values of all historical orders. To prevent that you may use suggestion mechanism associated with references.

In suggestion table you can define source-target pairs. Source is a column from the target of the reference, target is a column from the current table. When a user fills a reference column, source values are copied to the corresponding target fields. The values are copied, so the future change of price of an article won't affect the order record.

Definition of a reference's suggestion