The following is an issue you can encounter when using the Product Configurator. This issue is present in 10.2.300 – 10.2.400 and I assume even earlier versions have the same “feature”. While this example is specific to controls and events - there are several other scenarios that cause the same issue. Here goes …
In this example the controls have the following function / code.
1 – A simple text box with no actions or expressions defined
2 – A button with the following On Clicked Expression
MessageBox.Show("Character Box value is: " + (Inputs.CharacterBox.Value ?? "null"));
3 – A button with the following On Clicked Expression
Inputs.CharacterBox.Value = "";
4 – A Combo Box that uses a dynamic list with the Param bound to Text Box ( 1 )
5 – A button that refreshes the dynamic list in the Combo Box ( 4 )
The Problem
-
Launch the configurator using Test Inputs
-
Click Display Value button ( 2 ) and you will see this message
-
Click the Refresh Dynamic List ( 5 ) and it will not fail but does not fill the Combo Box, which is expected
-
Enter a Value in the Text Box ( 1 ) and click the Display Value button ( 2 ) again.
You will see your value appear like this -
Click the Refresh Dynamic List ( 5 ) and the Combo Box will populate
-
Click the Clear Character Box button ( 3 ) which will clear the Text Box ( 1 ) and then click the Display Value button again to see this
-
Click the Refresh Dynamic List ( 5 ) and you will get the following error
The Solution
Change the code for the Clear Character Box ( 3 ) to the following:
3 – A button with the following On Clicked Expression
/* Set character box value to a blank string */
Inputs.CharacterBox.Value = "";
Inputs.CharacterBox.Control.Nullable = false; // The solution
I have attached the example configurator in a zip file with the solution commented out so you can see the error.
Example.zip (7.9 KB)