Skip to main content


 

Symptoms


I have a multivalue checkbox list on my form based on a smartbox SMO (5 options). When the checkbox list changes I transfer the value into another data label on the view (1-5). If this data label CONTAINS 3 it should show 3 other controls, in all other cases it should hide these 3 controls.

Unfortunately this seems not to work. On when I first populate the view and the corresponding value of that checkbox list equals 3 I can see that it transfers this value into the data label on the view. If I select other options from this checkbox list the value of the data label changes also. So far so good. BUT even though the value of the data label CONTAINS 3 the other 3 controls will not show. Something like 2413 it seems not to contain 3 for this rule...
 

Diagnoses


After a few trial and errors, we finally managed to find the solution.
 

Resolution

First we figured out not to use a Checkbox List control, but rather use a Choice control then set it to be in the style of a Checkbox List.
Second, we found that even with this new control (that doesn't use XML and makes validation easier) the controls don't consistently show and hide after selecting and deselecting the "3" checkbox.

We then found that instead of using Advanced Conditions and IF statements / rules, we should use Expressions that will consistently return either true or false when the label or Choice control contains 3. Here are the steps (without pictures unfortunately):

1) Create an expression to determine if the control contains the necessary value
2) On the change of the Choice, set the properties of the three labels
3) Configure the actions to map the above expression to the Visible property of each control
4) Working




 
Be the first to reply!

Reply