Subtable field

This is the most important field type of all. Its job is to create a link between one table and another.

The field lets you select a row of values from another table and, through the mappings set, copy the values into the fields of the form.

Subtable field drop-down

The subtable also lets you make two linked data selections.

In an invoice, for example, after selecting the customer, the subtable shows the possible shipping addresses.

The Subtable field creates an additional field in the database to store the GGUID reference of the selected data row.

For example, creating the field Cliente automatically creates the field gguid_cliente. This field is only visible if the database is opened with other programs, and this reference is only for the main table.

Field Parameters

Main table
The name of the table the values are retrieved from.
Main condition
An optional SQL string to filter the values to retrieve. Besides fixed values, you can also use the fields of the record to make the filter dynamic. For example, entering codice='123' makes the subtable show only the values with that specific code; entering codice=[codice] uses the value of the [codice] field in the form (or in the table row) for the filter. If the subtable is on a field inside an additional table, entering codice={codice} makes the system look for the value in the form containing that additional table.
Main mappings
The mappings between the source table and the destination table.
Free Text
If ticked, lets you type free text in the field even without selecting a value.
Don't allow duplicates
If enabled, before saving the program checks all the values in the table. If another record with the same field value is found, saving is blocked.
Secondary table
After the first selection from the main table, you can set a second selection linked to the values of the first.
Secondary condition
An optional SQL string to filter the values to retrieve from the secondary table. It works like the main condition.
Secondary mappings
The mappings applied from the secondary table to the destination table.