Please enable JavaScript to view this site.

If a product has two options, A and B, that cannot be selected at the same time, these options are mutually exclusive, which is one of the most common rule scenarios to handle. Different strategies can be used for managing this depending on the situation.

Solution: Lookup parameter

A simple solution to handle mutually exclusive options without any need for rules is to model the two options as values of one lookup parameter. Since a lookup parameter only can have one value, A and B cannot be selected at the same time. However, this solution might not make sense if the two options aren't alternatives that are logical to group in a lookup parameter.

Solution: Disallowed combination rule

If option A and B are defined using two different parameters (or multi choice values) a simple solution is to create a disallowed combination rule that disables B if A is selected and vice versa.

Solution: Two template rules

Another solution than disabling the other option is to unset the selection of B if A is selected and vice versa. This can be done by using two template rules.

Let's say that A and B are modeled as two Boolean parameters. The two template rules should then be set up like this:

Template rule

Trigger parameters / value

Template parameters / values

1

A = Checked

B = Unchecked

2

B = Checked

A = Unchecked

 

It doesn't matter if A and B are modeled as Boolean parameters, multi choice values or lookup values of different lookup parameters, this strategy can be used in all cases. In the case of two lookup parameters let the template rules clear out the value of the parameter that hasn't just been set.

It might look like the two rules will come in conflict with each other, since directly after the selection of one of the options both A and B might be selected. So, how does the rule engine know which rule to run? The answer is that the rule engine only runs rules that are relevant in relation to the last set parameter. So, if the user makes B checked then rule 2 will run and if the user makes A checked then rule 1 will run, which is the desired result.

  

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