Adding a foreign key filter
One of the most useful annotations that you can set up on any of the attributes (elements) of the business entities in a data model is the foreign key filter.
Through this annotation, you can filter foreign keys by:
-
values extracted from the current record through using the standard XPath predicate of the relevant attribute,
-
complex expressions: literal and functions,
-
current record values and complex expressions.
Note that if the filter is not an XPath but a value, it needs to be enclosed in quotes (").
Before you begin
You have already created data models, business entities and attributes in the data model. For further information, see Creating a data model, Creating business entities in a data model and Adding attributes to the business entity.
About this task
Consider as an example that your data records hold the following entities: Agency, Agent and Region. The Agency and Region entities hold the Country attribute. In Talend MDM Web UI, you want to filter the foreign key values by the Country attribute.
To set a foreign key filter, do the following:
Procedure
What to do next
Now in any agency record in Talend MDM Web UI, every time a user clicks on the foreign key icon next to the Region field, the list will only include the foreign keys based on the Country attribute.