Administering : Managing business rules and expressions : Business rule definition examples : MatrixWriter example: Display information in different languages
  
MatrixWriter example: Display information in different languages
In this example, the MatrixWriter business rule is used to share information between modules that are in different languages.
The User Requirements module, which is in English, links to a module in another workspace that is in German. That module is called Benutzeranforderungen, which means user needs. In the User Requirements module, a Link List attribute called “User Needs” contains links to elements in the Benutzeranforderungen module.
In the User Requirements module, you want to display the following attributes from the Benutzeranforderungen module: Beschreibung, which means description, and Benutzertyp, which means user type. You need to display the attribute names in English so that the users of the User Requirements module can understand them. To display the information from the German module in English, you can use a parameter to hold the attribute names in the business rule. Then, in the Matrix headings, you can enter the attribute names in English.
1 In the User Requirements module, which is the target module, add a Matrix attribute named “Related User Needs”. The Matrix must have two columns and one row. In the first column heading, enter Description; in the second heading, enter User Type.
2 Add a Text attribute to be the business rule container attribute. In the default value for the Text attribute, enter the following text:
=MatrixWriter("User Needs","Related User Needs",
"1","true","Beschreibung,Benutzertyp",
"listen_to=Beschreibung","listen_to=Benutzertyp",'User Needs')
The MatrixWriter business rule populates the matrix with the values from the related elements in the Benutzeranforderungen module. If the Beschreibung or Benutzertyp attributes change, the matrix is updated.
Go up to
Business rule definition examples