Check Box List - Populated by SmartObject Not returning expected results.

  • 25 February 2015
  • 2 replies
  • 0 views

Badge +4

Hi All,

 

I have a series of cascading Checkboxes on a view that enables the client to select a check box from the first list box control list and it then opens the appopriate Checkbox list at the second level down to four levels.

 

It works when I use a Static List for the CheckBoxList Data Source, It simply returns the Text name given to each check box and I can evaluate it using an Advanced condition and Contains + the text that should be returned.

 

However when I use a Smartbox smartobject to populate the CheckBox List it returns a Number for each of the options, but the Advanced Condition with Contains no longer works. I get unusual results for example, I have eight checkboxes in my first list so they are returning the values of 12345678 when I use the contains for number 1 for example nothing happens, If I return the number 8 it does.

 

8 works

7 does not

6 does

5 does not

4 partially works

3 doesn't work

2, 1 dito

 

It's as if except for 8 and 6 it always evuates as TRUE which is just weird.

I have a message box popping up so I know what it should be returning. But the Condition doesn't seem to evaluate correctly.

 

13901iCB1225C8A47D489A.jpg For now I'll stay with the Static Lists as it works perfectly, even though it's a lot of work to set them up and keep them maintained at least it consistently works.

 

 

 

 

 

 

Any help would be appreicated.

Keith

 


2 replies

Userlevel 1
Badge +8

Hi Keith


Can I suggest you use a Choice control (installed as part of the SmartForms Control Pack) instead of the Checkbox List. You can set the Display Type property to check box and use a smartobject as the data source. 

 

This control will store the values you select as a delimited list (";" separated by default). Your advanced rule to check for a specific number (using contains in the advanced condition) should then work as expected - with the caveat that if you have more than 9 values (i.e. you have ID 10 and above) then checking for "1" will be true if the user checks any value with an ID that has the digit 1 in it (e.g. ID 10).

 

 

Badge +4

Hi All, 

 

The answer was simple in the end, my fault entirely. 

I should have been selecting a Text value to be returned from the SmartObject 

I was returning the Index of the SmartObject instead of the Text. 

So once I returned the Text Value of the Checkbox item, I was able to perform the Contains statement without a hitch.

 

Below is the configuration of the Data Source in my case a SmartObject, I just needed to change the return value to be the Checkbox Item Name.

 

 

16096iD535E4AD668433E4.jpg

 

Keith

Reply