Skip to main content
Skip table of contents

Asset relations configurations for tables and Properties Editor - SysAdmin

Asset relations configurations are used in Table widgets and in the Properties editor. In the Table widget, they define which assets can be added to a node of the table. In the Properties editor, they define, which asset structures can be expanded and edited in the editor table.

Context

  • Table widget configuration: In Table widgets, define which asset relations can be added/removed in each node of the table.

  • Properties editor configuration: In the Properties editor, define which asset structures can be expanded and edited in the editor table.

Prerequisites

You should have a basic understanding of relationships between assets and be familiar with the asset structures in your censhare system.

Introduction

The Table widget displays assets in a table view. Users can add or remove relations to the assets. This functionality must be configured separately for each relation and each node type of the table. It allows you to control, which type of relations users can add or remove in your system.

censhare stores the settings for the "Add relation" functionality in a configuration asset separately from the Table widget. Configuration assets are referenced in the table widget configuration in the Table relations configuration section. There, you can select one or multiple configurations. All configuration assets created as described in this article are available in the Table relations configuration of the Table widget.

For example, in censhare PIM, products are related to product items and feature stories. Each relation has a specific type. Therefore, an asset relation configuration is required for each relation type. In the asset relation configuration, you specify the relation type as well as source and target assets. In the Table widget configuration, you can add both table widget relations, so that users can choose which they want to create.

Configuration

To create a new asset relation configuration, proceed as follows:

Basic configuration

  1. Create a Module / Configuration / Asset relation (config) asset.

  2. Enter a name and resource key and click OK to save it.

  3. Go to the Administration tab and click 

     in the Administration widget.

  4. Select the Enabled and In cached tables fields.

  5. In the Usage field, select Asset relation configuration.

  6. Click OK to save.

Relation configuration

Field

Description

Relation section

Name (localized)

Enter a name for this configuration asset. Select the corresponding language from the drop-down list next to it. To add more localized names, click +.

Asset relation type

Enter the ID of the relation type or asset reference feature. You can find the IDs in the Master data/Asset relation types and Master data/Features table in the censhare Admin Client. For example, the ID for the Product item relation is user.product-item.; the reference ID for the Product category reference is censhare:product.category

Asset relation direction

Select Child or Parent, if the relation type is an asset relation. Select Feature or Feature reverse if the relation type is an asset reference, for example. Note that the same relation can be set up in two ways: from parent to child or from child to parent. If you are not sure in which direction a relation is created, check the configuration for the relation type or asset reference feature in the censhare Admin Client.

Asset source type

Enter here the source or node asset type(s). The field requires the ID of the asset type (for example: product.category.), or a wildcard (for example: product.*)
Note: The source type must conform with the displayed asset structure in the table. Otherwise, no source asset displays in the table.

Asset target type

Enter here the asset type that relates to the source asset. The field requires the ID of the asset type (for example: product.item.), or a wildcard (for example: product.*)
Note: The target asset types must correspond to the defined source type. Otherwise, asset structures do not display correctly.

Working copy section

Relation

This field is not needed in this context. Leave it empty.

Hints and tips

Choose the proper direction of a relation

Before you configure an asset relation, think about how users would create a relation from their perspective. Any relation can be created both ways: from child to parent or from parent to child. The same goes for asset references. Here, the directions are named "feature" and "feature reverse".

For example, the "Product category" relation can be created as an asset feature reference from a product asset source to a product category target. However, depending on your workflows, users may want to create a "Feature reverse" relation from a product category source to a product target. Technically, the result is the same in both cases, but the asset relation configuration is different.

Using wildcards in the asset source and target type definitions

Asset types in censhare can be configured in hierarchies. For example, the asset types "Product item", "Product accessory", "Product spare part" and others related to products are subtypes of the "Product" asset. In Asset type definition in the censhare Admin Client, the notation [asset_type].[asset_sub_type]. is used to indicate this hierarchy. Likewise, the wildcard expression [asset_type].* designates the asset type and all subtypes (as you may know from search fields and hierarchical value lists).

With a wildcard, you specify an asset type and all its subtypes instead of a single asset type as source or target asset, respectively. Wildcards are marked with an asterisk. The most generic usage of wildcards is just an asterisk "*" - this expression matches all asset types. For example, if you define the relation type "Assignment" (notation "user.") and an asterisk (notation "*") as target asset in the Table widget relation asset. Users then can assign any asset to the selected source asset type in the table.

Wildcards are handy if you want to configure multiple asset types as source or target asset that all belong to the same hierarchy. For example, if you define task.* in the target type field, users will be able to assign any (sub)type of task in the table widget. However, ensure that the relation type matches the asset types - in this case, the relation type has to be set to "user.task.".

In some specific cases, wildcards cannot be used. For example, you want to define a "product." as source asset type and then "product.*" as target asset type. There are several subtypes to products such as product items, product accessories or product warranties that match this pattern. However, all of these require a specific relation type: "user.product-item.", "user.product-accessory.", "user.product-warranty,". Therefore, you must configure one asset relation configuration asset per relation. It is not possible to configure multiple relation types in one asset.

Ensure that you use wildcards in combination with matching relation types such as "user.task." with "task.*" or use the generic "user." relation (assignment).

Asset filter dependencies

Note that relations might use asset filters, so that only a certain asset type can be a parent and, respectively, child asset. The widget configuration does not have any restrictions. However, censhare may apply asset filters when creating a relation.

Asset filters are defined for each asset relation type or asset reference feature. To check filters, open the "Asset relation types" or the "Features" entry in the Master data directory of the censhare Admin-Client. Search for the desired asset type or feature in the table and double-click to open the configuration. In the "Filters" entry, any configured filters are shown for parent and child assets.

Note on features: Both the configuration and possible asset filters only refer to features of the "Asset reference" or "Asset key reference" value type.

The filters defined in the asset relation or asset feature configuration determine, whether an asset relation requires a certain asset type as child or parent asset. Most relation types do use asset filters, except the generic “Assignment”. For example, the relation type “Product item” requires a “Product” asset as a parent and a “Product item” asset as child.

Coherent usage in Table widgets

In Table widgets, the displayed assets and respective asset relations are configured independently from the relation configuration described in this article. Both have to be coherent, though, in order to show the desired results. First, ensure that the source target asset type in this configuration is displayed at all in the Table widget. Otherwise, users cannot create asset relations. Second, ensure as well that all target asset types that users can add in the widget are displayed in the table. Otherwise, they can create the respective relation but the result is not shown. For example, the table configuration displays projects and tasks, and the relation configuration allows to add any task subtype asset (target asset type "task.*"). Users can create relations to, say, a Milestone, but will not see it in the table. The relation is created, though. In order to make the configuration coherent, ensure that the Table widget also shows the respective task subtypes.

Next steps

Use the asset relation configuration  in a Table widget, or in a Properties editor configuration.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.