# Setting up annotations to attributes

Availability-note[Deprecated](https://help.talend.com/r/en-US/Cloud/labels-on-talend-help-center/availability-deprecated)

This content is deprecated.

Available in...

* Data Fabric
* MDM Platform

## Before you begin

You have already created business entities and attributes in the data model. For further information, see [Creating business entities in a data model](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/creating-business-entities-in-data-model) and [Adding attributes to the business entity](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/adding-attributes-to-business-entity).

## About this task

The data model editor makes it very easy to add specific annotations to any attribute within the business entity.

Through annotations, you can define authorization of roles regarding web interface access to attributes. You can also define display issues related to language specific labels, foreign and primary keys, multilingual description, and more.

The below table describes the annotations you can add to attributes within business entities.

| Option | Description |
| --- | --- |
| Set the Descriptions | To have multilingual descriptions for different attributes in business<br>entities. |
| Set the Labels | To have labels in different languages for any attribute within a<br>business entity in the data model. |
| Set the Foreign Key | To link one attribute to another attribute or to a business entity. For<br>further information, see [Adding a foreign key: linking entities together](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/mdm-add-foreign-key "Talend Studio enables you to set relationship between different entities using Foreign Keys.").<br><br>Information noteNote:<br><br><ul> <li>A Primary Key can be an <kbd>integer</kbd>                                            but a Foreign key must always be a                                                <kbd>string</kbd>. The server surrounds                                            Foreign Keys with square brackets to support compound                                            keys.</li> <li>Foreign keys are only applicable to elements of simple                                            type.</li> </ul> |
| Set the Foreign Key Filter | To filter foreign keys by values extracted from the current record<br>through using the standard xpath predicate of the relevant element.<br>For further information, see [Adding a foreign key filter](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/adding-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."). |
| Set the Foreign Key Infos | To display the data related to the foreign key. For more information,<br>see [Setting the display format of the foreign key information](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/setting-display-format-of-foreign-key-information "Talend Studio allows you to customize the display format of the foreign key information whenever it is available in Talend MDM Web UI to improve its readability. By default, the elements in the foreign key information are displayed by being concatenated together with a ' - '."). |
| Set the Roles with Write Access | To grant one or several roles a Write access to the selected entity. For<br>further information, see [Defining access control at the attribute level (access control annotation)](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/defining-access-control-at-attribute-level-access-control-annotation "Talend MDM offers granular security down to the attribute level. This access control is done inside the data model through setting up specific annotations."). |
| Set the Roles with No Access | To deny access to the selected attribute for one or several<br>roles. |
| Set the Visible Rule | To define whether to hide/show the selected attribute from a data record<br>in Talend MDM Web UI . |
| Set the Default Value Rule | To define a default value of the selected attribute in order to display<br>it automatically when a business user creates a new record through<br>Talend MDM Web UI. For more information, see [Setting a default value rule for an element](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/setting-default-value-rule-for-element). |
| Set the Facet Message | To set multilingual facet error messages. |
| Set the display format | To decide the format according to which you want to display/insert, in a<br>specific language, dates or numbers in master data records in<br>Talend MDM Web UI.<br><br>To define the date/number format, you must use a syntax<br>that is based on the java.util.Formatter<br>class. For further information on this class, see [Oracle<br>documentation](https://docs.oracle.com/javase/6/docs/api/java/util/Formatter.html).<br><br>For an example on how to set the<br>display format, see [Setting the display format of dates and numbers](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/setting-display-format-of-dates-and-numbers "Talend Studio enables you to decide the format according to which you want to display/insert dates or numbers in different languages in master data records in Talend MDM Web UI."). |

When you add any of the above annotation to an attribute in a business entity, an Annotations node is added to the attribute in the Data Model Entities panel. This node lists all the annotations added to the selected attribute.

![](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/Annotation_Create2.png)

To set up an annotation to any of the attributes you create in a business entity, do the following:

## Procedure

1. In the Data Model Entities panel, right-click the attribute to which you want to add the annotation.
2. In the contextual menu, select the annotation you want to apply to the selected attribute.

   ![](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/Create_DataModel6_EE.png)

   A dialog box corresponding to the annotation option you have selected is displayed.

   For example, if you select Set the Labels to have labels in different languages for a selected attribute, the following dialog box pops up.

   ![](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/Create_DataModel7.png)
3. From the list to the left, select a language and then enter a label in the field to the right.
4. Click the ![](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/Plus_Icon.png) icon in the upper right corner to add the defined label to the Language/Label list and then click OK to validate your changes and close the dialog box.

   The set annotation is displayed under the selected attribute.

   ![](https://help.qlik.com/talend/en-US/studio-user-guide/Resources/images/Create_DataModel8.png)
5. Click the save icon on the toolbar or press Ctrl + S on your keyboard to save your modifications.

## Results

Detail examples about how to Set the Role with Write Access annotation are given in [Defining access control at the attribute level (access control annotation)](https://help.qlik.com/talend/en-US/studio-user-guide/8.0-R2024-04-and-earlier/defining-access-control-at-attribute-level-access-control-annotation "Talend MDM offers granular security down to the attribute level. This access control is done inside the data model through setting up specific annotations.").