Search based on checkbox status

Dear All,

I would like to populate a Repeat Group element based on a number of check box status; to make thing simple lets assume we have only three booleans (Yes/No) fields for each entry in a database {Name, bool_1, bool_2, bool_3}

I would like to return a list of all the elements that have at least the boolean field checked

For example, given the database populated:
1 0 0 0
2 1 0 0
3 1 1 0
4 1 1 1
5 0 1 1
6 0 0 1
7 1 0 1
8 0 1 0
9 0 1 1

  • CheckBox related to bool_2 = TRUE
    • I would like to have returned #8, #5, #4, #3, #9
  • If bool_3 = TRUE and bool_2=TRUE
  • I would like to have returned #5, #4, #9

and so on…

Is this possible easily ? (especially when the number of options are really big?)

A big thanks in advance and my apologises for my english. Please let me know if you need any additional information.

Thanks.

Ric

P.S> I have created a temporary public app with a dummy example: https://bubble.io/page?name=index&id=testvariedeventuali&tab=tabs-1

After performing a search, use :filter and create an advanced condition of OR statements. It’s not ideal, but it should accomplish what you want.

Hi Scott,

Thanks for the reply but I am not sure to have fully understood.

What I finally end up doing (aka horrible workaround) is:

Given the following table

The workflow triggered by the button is the following:

  1. empty the list currently in the repeated group of things

  2. Display List in Repeating Group by ‘searching’ without constraint…basically getting all the table

  3. Display List in Repeating Group by: (searching for option1 = yes) intersect with (the result of the previous step) and put in the ‘only when field’ when checkbox1 is checked

  4. repeat step 3 but with option 2

  5. same as before until you do all the options…

I think and hope that there is a better way of doing this because regardless of the time necessary to implement all this when you have many options, it is really hard to mantain and really prone to error.

If anyone has a better way of doing it, please share! :slight_smile:

Many thanks

Riccardo