Please enable JavaScript to view this site.

Management of large collections of data that are coded directly in rules quickly becomes cumbersome to set up and difficult to maintain.

The correct strategy to do this is in Combinum is to put the data in dictionaries and use template expression rules or data selectors for pulling the data. The data selector is a user interface control that is used for letting the user do selections directly in a filtered and sorted table and for setting parameters based on the selection, read further about data selectors.

Below is a description of how a template expression rules can be used for retrieving default data from a dictionary in a way that lets the user change the values afterward.

Example

Imagine that you are a manufacturer of prefabricated villas. You have 50+ models of villas, you allow the customers to do selections for the surfaces of each room, and each villa model has different default values. Imagine further that you have decided to manage all villa models as one product in Combinum and called this product "Villa". You also need the floor and wall areas in square meters of each room in order to calculate price changes when different materials are selected.

The default data can be gathered in a dictionary "RoomData" like below where each room is identified by a key that combines the villa model and the room instance:

Key

FloorM2

Floor

WallsM2

Walls

WallsOtherM2

WallsOther

VillaA.Kitchen1

18

OakPremium

28

Painted

6.2

TileTuscannyWhite

VillaA.Living1

39.6

OakPremium

46

Painted



VillaA.Bed1

14

OakPremium

35.5

WallPaperClass2



VillaA.Bed2

10.8

OakPremium

31

WallPaperClass2



VillaA.Bath1

7.2

TileTuscannyBlack

25

TileTuscannyWhite



VillaA.Laundry1

8.6

TileRusticGray

28

Painted



VillaB.Kitchen1

21.6

OakLight

33

Painted



...







 

The CPQ architect has decided to let the rooms be individual configuration models, so below the product "Villa" a child product "Room" has been added. Furthermore, when configuring a villa the right set of room configurations like "Kitchen1", "Living1" are automatically generated once the villa model has been selected by using the functionality of dynamic instances.

To manage the selections of surfaces for each room the CPQ architect has created the parameters below:

Parameters

Description

Model (Lookup)

The Model parameter is selected at the Villa level but is also available for rules at the Room level via parameter propagation. Values: "VillaA", "VillaB", ...

DataRetrievedForModel (String)

This parameter is placed on a hidden tab and is used for discovering when the user has selected another villa model which requires the room data to be retrieved again.

Room (Lookup)

The Room parameter identified the type of room and is set automatically when room configurations are generated by using dynamic instances. Values: "Kitchen1", "Living1", ...

DataRetrievedForRoom (String)

This parameter is placed on a hidden tab and is used for discovering changes in the type of room that the active room configuration represents.

FloorM2 (Double)

Floor area

Floor (Lookup)

Floor covering

WallsM2 (Double)

Total wall area

Walls (Lookup)

Wall covering

WallsOtherM2 (Double)

Wall area covered in a different material

WallsOther (Lookup)

Wall covering in different material for part of the walls

 

To pull the correct default data from the dictionary when a villa model has been selected the CPQ architect has created the template expression rule below:

Setting name

Value

Trigger continuously

Checked

Inclusion expression

Model != DataRetrievedForModel || Room != DataRetrievedForRoom

Parameter expression 1, sets the parameter DataRetrievedForModel

Model

Parameter expression 2, sets the parameter DataRetrievedForRoom

Room

Parameter expression 3, sets the parameter FloorM2

RoomData[Model+"."+Room].FloorM2

Parameter expression 4, sets the parameter Floor

RoomData[Model+"."+Room].Floor

Parameter expression 5, sets the parameter WallsM2

RoomData[Model+"."+Room].WallsM2

Parameter expression 6, sets the parameter Walls

RoomData[Model+"."+Room].Walls

Parameter expression 7, sets the parameter WallsOtherM2

RoomData[Model+"."+Room].WallsOtherM2

Parameter expression 8, sets the parameter WallsOther

RoomData[Model+"."+Room].WallsOther

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC