About this task
You can set a rule to define which element is visible under what conditions in Talend MDM Web UI.
The following example shows how to set a rule so that the optional TermDate element in the Agent entity is visible only if the year specified in the StartDate element is larger than 2010.
- In the Data Model Entities area, click the element of interest.
- In the Properties view, click the Rules tab, and then click the Visible Rule tab.
In the Expression area, set the criteria for the
You can enter the criteria directly or use the expression editor.In this example, use the expression editor as follows:
Select Durations, Dates and Times from the Categories area.
Double-click fn:year-from-date(date) from the Functions area.
Read more information about the function from the Help area.
In the Expression area, clear date from fn:year-from-date(date).
Click the xpath button below to open the Select Xpath dialog box.
Select Agent/StartDate and click OK to close the dialog box.
Click the > button after the function.
2010after the operator
The criteria are now set:
Save your changes, and then click OK in the
Validation Result Dialog dialog box that opens.
Warning: If you define a visible rule for a mandatory element, a warning is displayed to indicate that the mandatory field may not be visible due to the visible rule.
Deploy the modified data model to the MDM server, and then go to Talend MDM Web UI to verify that the visible rule has taken effect.
For more information about how to deploy items to the MDM server, see Deploying repository items to the MDM Server.