Relationship Filter

If the relation is further limited by a filter, you can specify such a filter adding a Relation Filter Reference element under the relation element.

Attributes

Filter Specifies one of the filters predefined for the related entity. If no filter appears, you have to define them first in the related entity.

The Relationship Filter is only activated when retrieving data from databases to restrict the amount of data loaded. After the data are loaded, the filter has no effect. It is important to ensure that users don’t enter data which don’t conform to the filter. You would do this e.g. by using a filtered drop-down list in a screen section. You can also use a data structure default set to set different default values to filtered entities.

Example

You have a Customer entity and Invoice entity. You create a relation between Customer and Invoice, so you can easily load all invoices by a customer.

Now you want to have 2 relations: Customer_Invoice_Inbound and Customer_Invoice_Outbound. In each relation, you want to relate to a specific type of invoice. In data structure, you would have 2 entities, one for outbound and one for inbound entities.

The solution is to create 2 relations and include a filter for an invoice type for each relation. When reading data from a database, the data loaded by each relation will be limited by this filter.