Component description
The codetable-label component assigns values from code tables to objects. Visually, it allows the selection of code table values and the creation of object relations using the value.
Example
Minimal JSON
{
"type": "codetable-label",
"values": [
{
"objectTypeKey": "",
"relationTypeKey": ""
}
]
}{
"type": "codetable-label",
"values": [
{
"objectTypeKey": "core_code_lists#label",
"relationTypeKey": "core_code_lists#has_label"
}
]
}Example taken from the Writing an Application Package tutorial.
Nested properties
| Property | Description | Values | Mandatory |
|---|---|---|---|
type | codetable-label | string | Yes |
values | Array of values defining what objects are selectable in the codetable label. | array | Yes |
componentId | Unique ID of a component. If left empty, a random string will be generated. Primarily used in patch packages to define the component's position within the layout (template). | boolean | No |
title | Translation key of the title. Define the key in translations to specify how the text is displayed in the UI. Unlike the name property, if you use a specific string of text for the title, this text will appear with the package key. For example, Comment Section will be displayed as package_key_comment section. | string | No |
Nested properties in values
| Property | Description | Values | Mandatory |
|---|---|---|---|
objectTypeKey | Object type displayed in the list of values. | string | Yes |
relationTypeKey | Relation type defining the displayed object types. By default, you can select multiple values in your codetable lable. To enforce a single value selection, set the is_single_value feature of the relation type to true. | string | Yes |
applicationIds | Application(s) in which to search for code table values. To refer to the current application, use @appId. | integer or “@appId” | No |
applicationKeys | Keys of all relevant applications (including the current one) in which to search for code table values. | string | No |
basedOnFirstLevelRelationTypeKeys | Keys for the first type of relations that influence the selection of a codetable label. | string | No |
basedOnSecondLevelRelationTypeKeys | Keys for the second type of relations that influence the selection of a codetable label. When a relation based on second level is created, it will be saved even if the first-level relation is deleted. For example: We have a relation between Object A and Object B., Thanks to this we can create a relation between Object A and Object C., We delete the relation between A and B. Relation between A and C stays. | string | No |
| isConditional | Determines whether the selection of a codetable label is dependent on specific conditions. This property works together with basedOnFirstLevelRelationTypeKeys and basedOnSecondLevelRelationTypeKeys to define those conditions. | boolean | No |
spaceId | Space(s) in which to search for code table values. To refer to the current space, use @spaceId. | integer or “@spaceId” | No |
title | Translation key of the title. Define the key in translations to specify how the text is displayed in the UI. Unlike the name property, if you use a specific string of text for the title, this text will appear with the package key. For example, Comment Section will be displayed as package_key_comment section. | string | No |