Composite Attributes
You can combine primitive attributes as members of a composite attribute. This combination can either be done in simple mode or in table mode. In simple mode, you can store a single composite data entry in the composite attribute, such that the data entry is a combination of one value for each primitive attribute member. In table mode, you can store multiple such data entries in the composite attribute — when displayed and edited, each primitive attribute becomes a table column and each data entry a table row.
When a Model Manager server database is created, two composite attributes in table mode — Attachments and Model Versions — are automatically created for you. They correspond, respectively, to a list of uploaded file attachments and a list of links to model versions in repositories. The single members of both composite attributes are set as primary members — see Adding Composite Attributes for definition.
The Composite Attributes page, opened by clicking Composite Attributes in the Database navigation sidebar, shows a table with all composite attributes in the database. The table columns are:
The Label column — the label of the composite attribute.
The Identifier column — the unique identifier of the composite attribute.
The Description column — the optional description of the composite attribute.
The Mode column — the mode of the composite attribute, which could be either Table or Simple.
Click on the label of a composite attribute in the table to show more details for that composite attribute. Click the Add button to add a new composite attribute.
Adding Composite Attributes
To add a new composite attribute:
1
Write a label for the composite attribute in the Label field. The label is shown on an asset page as a header to the primitive attribute members.
2
Write an identifier for the composite attribute in the Identifier field. This identifier must be unique among the set of all attributes — primitive and composite — and start with a Latin alphabet character followed by zero or more additional such characters, numbers, or underscores.
The identifier of a composite attribute is used in the Model Manager search syntax when filtering on attribute values — see Searching on Asset Attributes.
An identifier will be automatically generated as soon as you starting typing in the Label field. Feel free to change the generated identifier as you see fit.
3
The description is shown as a tooltip to the attribute field label on The Asset Page.
4
Select between Simple and Table mode in the Mode list.
5
Add member primitive attributes in the Add primitive attribute list. Added primitive attributes are shown in a table under Member attributes in the order they will appear on the asset page — top-to-bottom for Simple mode and left-to-right for Table mode. You can rearrange the member attributes using drag and drop — see also Rearranging Table Rows.
Select New primitive attribute in the Add primitive attribute list to both create a new primitive attribute in the database and add it as a member to the composite attribute — see Adding Primitive Attributes for the available fields. The created primitive attribute may later be reused for other composite attributes as well.
Click Edit (the pen icon) next to an attribute added via the New primitive attribute option to edit its fields. Click Delete Permanently (the cross icon) to permanently delete the attribute from the database.
Select the checkbox of those member attributes that should be set as primary members in the Primary column. Being a primary member imposes the following constraints:
-
-
Only primitive attributes of value type Attachment, Boolean, Date, File version, Integer, Keyword, Model version, and User support being set as primary members.
6
Click Save to add the new composite attribute.
Any new primitive attribute created via the Add Composite Attribute page will remain in the database even if you cancel the composite attribute creation. You can delete it via The Primitive Attribute Page.
Defining a composite attribute in Table mode with a single primitive attribute is how you get a data field that can contain a list of values. Examples include a list of supplementary files or a list of linked model versions. The only exceptions are a list of string values or a list of users for which you can use a primitive attribute with the Keyword array or User array value type, respectively— see Table 3-7.
The Composite Attribute Page
The Composite Attribute page contains details on a composite attribute in the database. The fields are:
Identifier. The unique identifier of the composite attribute.
Label. The label of the composite attribute.
The label is used as the field text of the attribute on The Asset Page.
Description. The description of the composite attribute.
The description is shown as a tooltip on the field label of the attribute on The Asset Page.
Mode. The mode of the composite attribute — either Table or Simple.
Member attributes. The list of primitive attributes that are members of the composite attribute. The primary members have a checked marker in the Primary column.
Workflows. Links to workflows that are based on the composite attribute — see Composite Attribute Workflows.
Click Edit to edit the composite attribute, including possibly changing or rearranging its primitive attribute members.
Removing primitive attribute members from a composite attribute should be done with care. If you open and subsequently save a new version of an asset that uses a composite attribute for which a member has been removed, any data for that primitive attribute member will be excluded from the new version. Similarly, if you change from Table mode to Simple mode, only the data in the first table row will be kept in a new version of an asset.
Click Duplicate to open the Add Composite Attribute page filled in advance with the current composite attribute’s mode and member attributes.
Click Delete Permanently if you want to permanently delete the composite attribute in the database. The attribute will be automatically removed from any asset type using it. Any assets with data for the composite attribute will, however, be left untouched until you save a new version of the asset (in which case the data will simply be excluded from the new version).