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

PropertyDescriptionValuesMandatory
typecodetable-labelstringYes
valuesArray of values defining what objects are selectable in the codetable label.arrayYes
componentIdUnique 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).booleanNo
titleTranslation 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.stringNo

Nested properties in values

PropertyDescriptionValuesMandatory
objectTypeKeyObject type displayed in the list of values.stringYes
relationTypeKeyRelation 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.stringYes
applicationIdsApplication(s) in which to search for code table values. To refer to the current application, use @appId.integer or “@appId”No
applicationKeysKeys of all relevant applications (including the current one) in which to search for code table values.stringNo
basedOnFirstLevelRelationTypeKeysKeys for the first type of relations that influence the selection of a codetable label.stringNo
basedOnSecondLevelRelationTypeKeysKeys 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.stringNo
isConditionalDetermines whether the selection of a codetable label is dependent on specific conditions. This property works together with basedOnFirstLevelRelationTypeKeys and basedOnSecondLevelRelationTypeKeys to define those conditions.booleanNo
spaceIdSpace(s) in which to search for code table values. To refer to the current space, use @spaceId.integer or “@spaceId”No
titleTranslation 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.stringNo