Me again.
I have finally been able to do what I wanted, but not in an elegant or efficient way. It confirms what I suspected : tv filters on TVs with multiples values checkbox do not work.
Or, rather, it could work but it would mean using a filter with multiple conditions to be tested (in my case, far too many if you consider the number of possibilities with 9 checkboxes... no math whiz don’t remember the formula for permutations and combinations...) : e.g let’s say I want to list all items having Value3 set as true (among 9 possible values for the items) no matter what other checkbox the Item has checked.
I’d have to test :
- value3||value1
- value3||value2
- value3||value4
- value3||value5
- value3||value6
- value3||value7
- value3||value8
- value3||value9
plus any combination of Items, examples :
- value3||value1||value2
- value3||value4||value5||value7
or even (not likely since my items are employees skills...) :
- value3||value4||value6||value8||value9
etc...
This is due to the fact that having multiple value checked in a checkbox is stored in the DB this way : if value 1 and 6 and 8 are checked, then you’ll have this string as value for the given item : value1||value6||value8. I tried switching to multiple select type for the TV but same problem.
What I did what take the previous TV named skills (a multiple checkbox TV) and make that 9 TVs :
- skill1
- skill2
...
- skill9
each with a single checkbox.
And now the exact same snippet calls works
If I am missing something, please enlighten me !