I am trying to use a checkbox to filter a repeating that a data field of type yes/no. How can I set the checkbox in a way that if checked only shows a set with Yes in database, but if unchecked shows both yes/no (all available options)
hello again @lstk.kb I am sorry but I don’t seem to understand. What I’ve done was put in repeating group: do a search for Field 1 = checkbox 1 is checked. But when i go conditional and if I set When checkbox is unchecked, I dont seem to find anything that states to show all results
I taught about using a custom state for the checkbox by stating if checked its value is yes, but if unchecked the value its nothing. You reckon this may work? And in the repeating group doasearchfor field 1 contains checkbox 1 value but even this I believe wont work
Do two searches for RG if checked or if not checked.
Genius mate thanks one more time. Do you if theres anyway to make checkbox’s more visualy atractive?
I use icons
Alright, great idea. I came across something where I have more than one checkbox. So in the conditional If I have two, Does it mean I have to create extra conditions that implies both? Like when A is checked and B is checked do a search for where type A is and Type B is Yes.
I came up with the solution that takes 8 conditionals in my case, and it could be useful for other people.
I have 3 checkboxes which represent data fields of value yes/no. So in order for the rg to work properly all I had to do was to create 8 conditionals. Why? All the possible combitions between the 3 so theres no data leftout of rg. It equals to 2^3. And conditionals would go when checkbox A is checked and Checkbox B is checked and Checkbox C is checked, then do search for “whatever applies to you”. @lstk.kb what you think?
Hey @paulogustavopeixoto yep it’s not ideal to set up redundant conditional searches. 8 is a lot to maintain, especially if you have other search criteria to keep consistent between the conditions.
Another trick that runs pretty fast is to add an advanced filter after the original search. You can create a filter for each checkbox, with the following format:
“This [item]'s [yes/no field] is yes OR [checkbox on the page]'s value is no”
This way, if the filter on the page is unchecked, the expression above will evaluate as TRUE for ALL items (i.e., no filtering). If it’s checked, then the expression will filter for only items with “yes” for that field. You add a few of these advanced conditions under a single “:filtered” expression and you’re all set!
Thanks I learned something today
There is also another way to do it.
It is to have a condition (checkbox is yes or no) on the RG current cell. and apply “This element is visible”
And tick the boxes in the appearance tab