Default Values

Purpose

The purpose of Default Values is to apply default values to new items created in Perfion. Default Values are used when many items hold similar data, which will save the user from entering the same value repeatedly for different items. This saves a lot of time when maintaining items in Perfion and is also less error prone as the correct value for a feature is set automatically.

Managing Default Values

Accessing Default Values

In a Configuration, Default Values are set at feature level. Default Values can be accessed in the Configuration view by pressing the ‘Default Values’ button in the top-panel. This will enable the Default Values-column in the Configuration grid.

 

Default Values Limitations

Supported datatypes

The following datatypes support Default Values:

  • Date

  • Link

  • Number

  • String

  • Text

  • Table

  • Boolean

Supported feature properties

It is possible to apply Default Values to features with the following property-combinations:

  • Explicit

  • Selectable

  • Selectable Multi-values

Localizable features

It is possible to apply Default Values to localizable features, but multi-language in the Configuration View is not supported. To set a Default Value in a specific language it is necessary to login with an Administrator user in the desired language and set the Default Value for the specific localizable feature.

Formulas

The Formula-editor is not supported in the Default Values column, but formulas can be entered manually.

Copy

It is only possible to enter Default Values when the Copy checkbox is unchecked. To view the Copy checkboxes click on Copy at the top in the Configuration.

 

Setting Default Values

Default Values can be set by entering values in the cells in the Default Values column. After setting a Default Value, the value is applied to new items created in the grid for the given Configuration.

A Simple Example

Go to Features and open an existing Configuration. Click the Default Values button to show the Default Values column:

 

Double click (or press F2) the cell in the Default Values column for ItemNumber and enter a value. Press Enter.

 

Now go to the grid and add a new item. The Default Value set for ItemNumber (‘IN304050’) is then applied to the item upon creation.

 

Item Dependencies

The same feature can appear multiple times in a Configuration, if the Configuration contains Item Dependencies.

In the following example we will examine how to specify default values for Item Dependencies.

Example 1 – Simple Item Dependencies

In the Configuration below, the features Item Number and Short Text appear two times each on the same Configuration. Once one the Item Dependency Coffee Machines and once one the Item Dependency Cups.

When adding a new item in the Coffee Machines Category, the following Default Values are applied:

  • Item Number: IN_Coffee

  • Short Text: Coffee short text

When adding a new item in the Cups Category, the following Default Values are applied:

  • Item Number: IN_Cups

  • Short Text: Cups ShortText

Example 2 - Feature appearing on the same node-level

In a Feature Configuration, the same feature can appear multiple times. When working with default values this can come in handy, when wanting to assign different values when certain conditions are met.

The Feature Power have been assigned two times to the Configuration in the following example. Both of the instances of the Power feature appears on the same node-level. In this case, the algorithm chooses the first occurrence of the feature. When creating a new Coffee Machine, the Power default value will in this case be set to 100, as this is the default value of the first occurrence of the Power feature.

As shown above, the Power’s default value is set to 100 when a new item in the Busses-category has been created.

Example 3 – Feature appearing on different node-levels

Multi-occurrences of a feature in a Configuration can also happen on different levels. If this is the case, the algorithm will take the deepest default value of a given feature an apply that value to newly created items.

In this example, the feature Power is present two times in the Product Configuration. The first occurrence of Power, and the highest Power occurrence has a default value of 100. The next occurrence of Power is on a deeper level and has a default value set to 500.

When a new item in the Coffee Machine-category is created, the Power feature’s default value is set to 500, because that is the deepest default value in the configuration.

Perfion API

Items created with the Perfion API (via Insert-statements) are also enriched with default values.

Example

Let’s assume these simple Default Values have been set up:

Now you run a basic Insert-statement like this:

<Query>    <Insert>       <Item brand='Normal'>          <Value>ABCD-123</Value> <Category language='EN'>Coffee Machines</Category>       </Item>    </Insert>    <From id ='Product'/> </Query>

Since Coffee Machines is specified as the Category in the Insert-statement, it will create a new item with these three values in the Coffee Machines Category:

  • Base value:                           ABCD-123

  • Item Number:       IN_Coffee

  • Short Text:                            Coffee short text

Perfion Import

Items created with the Perfion Import tool are not enriched with default values. This will be added in a later release.

Â