Skip to main content

Foreign key filters

Availability-noteDeprecated
This section defines some best practices regarding foreign key filters.

Currently, foreign key filters are only used in the Talend MDM Web UI. They are a way to restrict a list of values presented to the user in a foreign key picker. If you recall the reusable reference data example from earlier in this article:

But in the model, both of these foreign keys are pointing to the same entity.

In the example above, foreign key filters have been used to restrict the results shown:

Here, [Title] is a value in the 'refDataItem' record, and also a foreign key from 'refDataItem to 'refDataList'.

Information noteNote: It is possible for the value in the Value field of the FK filter to be an XPath to another field in the current record, rather than be a hard-coded value. This can be used to create a sequence of multi-level picklists. For example, if you select an FK from field 1, this determines the values available for picking in field 2, etc. However, these dependencies cannot be enforced.
Information noteNote: Foreign key filters are not enforced by the model. For example:
  1. The user selects value A from the first foreign key picker from selection A, B and C.
  2. Using an FK filter, this limits the values available for selection in a second foreign key to A1, A2 and A3. The user selects A1.
  3. Now the user changes the first foreign key picker to B and saves the record without reselecting from the second picker. If they did, they would have picked from B1 and B2. No error occurs.

The only way to enforce these types of dependencies in the Talend MDM Web UI is by using a 'beforeSaving' process. For ELT or services interacting with MDM, these dependencies would be enforced by the integration layer and an FK filter would be of no use.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!