Skip to main content
15-Moonstone
August 3, 2022
Solved

Options and Variants: Advanced expression and an option with none selected choices

  • August 3, 2022
  • 1 reply
  • 1114 views

I have an option "A" with choices "A-1", "A-2" and "A-3". The option has "Required" and "Single Choice Selection" both set to "No".

The end item structure has a configurable module with module variants "VAR-A0", "VAR-A1", "VAR-A2" and "VAR-A3".

I want the configurator to add only the module variant "VAR-A0" to the variant structure when none of the choices are selected. And when one or more of the choices are selected, each of the module variants corresponding to the selected choices should be added.

When one or more choices are selected, the configurator works just as expected. But if I don't select any choices, the configurator adds all four module variants to the variant structure.

 

Here are my expressions for the module variants:

expressions.png

 

With this choice selection:

choices.png

 

I get this result:

result.png

Is there something wrong with my expression in module variant "VAR-A0"? How should I write the expression in order to achieve what I described?

Best answer by N-Pyn

It seems that this is a bug related to empty choice selections.

 

If I add a choice "A-N" to the option and select it:

 

fix.png

Then the -"A-1" + -"A-2" + -"A-3" expression works as intended:

 

fix_result.png

1 reply

N-Pyn15-MoonstoneAuthorAnswer
15-Moonstone
August 4, 2022

It seems that this is a bug related to empty choice selections.

 

If I add a choice "A-N" to the option and select it:

 

fix.png

Then the -"A-1" + -"A-2" + -"A-3" expression works as intended:

 

fix_result.png