Creating Complex Attribute¶
Note
Creating a complex attribute is only available for the reference set
Complex attribute is a data model object that can contain other attributes of various types.
To create complex attribute, you need to create a nested object.
Creating Attribute¶
To create simple attribute:
Make sure that at least 1 nested object is created.
Make sure that the "Attributes" tab is active.
Click the "Add attribute" button located in the list of attributes of the current entity.
Select "Complex attribute" in the list.
Fill in the required attribute fields:
"Name": The unique system name of the attribute. Uniqueness is checked at the same nesting level. Thus, if a simple attribute is used as part of a complex attribute, then the same name can be used in another complex attribute. Once saved, the name cannot be changed.
"Attribute display name": name of the attribute that will be displayed in the system interface.
"Nested object": Select the desired nested object from the list of previously created objects. As a result, the attributes of the selected nested object will be added to the complex attribute. If the nested object contains its own complex attributes, then the entity attribute structure will have nesting of level 2 and deeper. If necessary, click "Go to [selected object name]" to go to the nested object screen.
Configure the attribute properties:
"Description": text that is output to the data operator when the mouse cursor hovers over the attribute.
"Hidden": if set to "yes", the attribute is not displayed in the general view of the record.
"Min" and "Max" fields: minimum and maximum number of nested attributes.
"Custom properties": list of parameters (the "name" – "value" pair) that contain additional text information. Parameters can be referenced by custom extensions, and parameters can also contain non-standard information from external systems.
Save changes, if necessary. Click "Save" in the upper-right corner of the screen. If filling errors are detected during saving, a corresponding message will be displayed on the screen. All changes in the entity will be saved.
Key Attribute Usage¶
Key attribute - is an attribute whose value is checked for uniqueness between instances of a complex attribute within a record. Not mandatory, can be editable.
A simple string or integer attribute can be selected as a key attribute.
For integer attribute there is no autogeneration, so the user must specify the value and control the uniqueness himself.
In the xml data structure in the model.xml file, the assignment of autogeneration to a simple string attribute of a nested object is set in the valueGenerationStrategy
property; the assignment of an attribute as key in a complex attribute of a registry is set in the complexAttribute
property - the nestedEntityKeyAttribute
attribute.
Usage for Having Instance Identifier of Complex Attribute¶
Create a nested object.
For the nested object, create a simple string attribute, set the read-only flag, and select the "Autogenerate (GUID)" strategy.
Important: give the user access rights to view this attribute in the "Data" permission group
For the complex attribute of the required entity (in the "Data Model" section), define this attribute as a key attribute.
This way, when creating a record with instances of the complex attribute, saving a draft or publishing without a draft, the attribute values will be generated automatically. The attribute values will not be modified because the attribute has a read-only property.
You can also determine which instance of a complex attribute has been deleted, added, or modified.
Linking Instances of Complex Attribute to User Objects During Integration¶
Create a nested object.
Create a simple string or integer attribute for the nested object. Keep the "Not Used" option in the "Select Strategy" field.
Important: the attribute must be editable
For a complex attribute of the required entity (in the "Data Model" section), define this attribute as a key attribute.
When inserting or updating a record, the user must enter the value themselves and ensure that it is unique.
Note
Violation of key uniqueness within a record (uniqueness within all entity records is not checked) causes a publishing error, which will be displayed in the user interface