Relation Editor

Reference documentation for the Relation Editor


The Relation Editor is a graphical interface that allows the creation of relations between two tables at Servoy level, not database level, which can be used as a filtered data source in multiple places i.e. show a related form in a tab using the Tabpanel component


Name & Tables Selection

Source and Destination tables can be any Database Table, Database View, or In-Memory Table, View Foundsets can be used only as Destination, and the same table can be used as Source and Destination as well. Table selection can be done by entering manually the database name and table name or using the Datasource Selection Wizard.

Once Source and Destination are selected the relation name is automatically generated but it can be edited.

Fields Selection

There is a list of empty rows where you can select any field from the Source table to match a field on the Destination table indicating what type of operator should be used to compare them, the two fields on a single row must be the same type.

A Source field can also be a scope variable and the variable type must also match the type of the Destination field.

The available operators are:



Equal. This is the default operator. This is also an IN operator when the Source field is an array variable


Greater than


Less than


Greater or equal than


Less or equal than


Not equal



not like

Not Contains

For each operator, there are some modifiers that can be applied:



The Destination field can also be null besides the operator specified


When the fields are text, the comparison is done without considering uppercase or lowercase


When the Source field is a scope variable and it's null the criterion is removed from the relation when querying the table


There are a number of options that can change the behavior of a relation and how Servoy handles records in either the Source or Destination table.


Join type

It can be either inner join or left outer join

Initial sort

Allows to define the default sorting used the first time the relation is created using the Sorting Fields Wizard


Flag to indicate that the relation should not be used


Determine the scope of the relation: Public, Hide in Scripting: Module Scope, or Module Scope

Allow creation of related records

Flag to indicate if new records can be added in the Destination table using the relation criteria

Allow parent delete when having related records

Flag to indicate if a record in the Source table can be deleted when there are still records in the Destination table that match the relation criteria

Delete related records

Flag to indicate if all records in the Destination table that match the relation criteria must be deleted when a record in the Source table is deleted


Free text box to enter a comment about the relation

Last updated