Sammensat tekst_
Combining existing attributes to composite text
Setup
To be able to create composite text you need superuser access to your dRofus database. From the top menu in dRofus navigate to Administration→ Settings→ Items;
There are three options for composite text; Composite text - item, Composite text - occurrence and Composite text - products.
In this example, a Composite Attribute will be created for items. The described process can be used for occurrences and products as well.
To create new composite text (for items) go to 'Composite text item' and click 'Add':
Name: Name of the new attribute containing the composite text
Group: Where you want the attribute to be placed in the items property panel. You can use existing groups like "General", "Connections" or "Classification", or type in a new name - which will create a new group in the item property pane.
Tooltip: Optional help-text that will be visible when hovering the cursor over the attribute.
Show in property panel: Choose if you want the composite text attribute to be shown in the property pane or not. In most cases you will want to have it visible in the property panel, but in some cases the project might want to e.g. sync the text directly to the model without having it visible in dRofus at all.
Composite text: Defines how to composite the chosen fields in the new attribute. The text can be customized by using {0} to refer to the first field in the list of fields, {1} to refer to the second field etc. You can add delimiters between fields (e.g. URL's , - / etc.)
Fields: Select 'Add/remove fields' to add fields to include in the new attribute.
In our example we have following settings;
I have named the attribute "Name - BIM ID" and placed it in the 'General' group in the item property panel. We have typed in a Tooltip and included in the property panel. I have added "Name" and "BIM ID" as fields and decided that the fields ({0} & {1}) should be combined with a hyphen (see the 'Composite text' option).
The result in the item property panel will look like this;
The group is highlighted in blue. Then the values in 'BIM ID' and 'Name' (highlighted in orange) has been combined in a composite text in our new attribute ' Name - BIM ID'.
Combining existing attribute with URL to create composite text
In the next example we will describe how you can create full URL's by combining an existing attribute with part of a URL. The part URL will be a static value, while the dRofus attribute will be another static value that in combination will create a dynamic URL. In this example we will use composite text for products. This process can be used to create URL's to products online or link to products in external product databases.
Setup
The setup will follow the same pattern as above, however, instead of adding two existing attribute we want to combine one attribute with a static URL.;
In the 'Fields' option I have simply pasted the static part of the URL to IKEA's product (highlighted in yellow). Then I have added the product number from dRofus to complete my composite text. The idea is that this combination will automatically create the valid URL to the product specifications.
The result in product property panel will look like this:
In the 'Product URL' attribute we have used composite text to create a full URL by combining an existing dRofus attribute with a static part of an URL.