Filtering checked

Dear all, I have a repeatinggroup of checkboxes generated based on an OptionSet. The user can check and uncheck some of these checkboxes and then I want to filter the options that are checked.
I’ve tried to use filtered and “Constraint: “yes”” as shown on the screenshot but all options are always selected even if the checkbox for an option is unchecked. I think that the “yes” constraint isn’t changed when I check or uncheck an option. How to filter only the checked options?

alternatively if you can tell me how to set an option to “no” it could solve the isse. Again checking or unchecking the checkbox doesn’t seem to change “yes” or “no” and initially it is set to “dynamic” “no”. However it seems always “yes” when filtered because all options are listed anyway without any filter. Thanks

Honestly, I’d have to assume that your entire set up is incorrect if I’m imagining your desired outcome correctly.

Let’s start with this:

When a user selects/unselects an option set, where is that selection being saved? In the database? As a state?

The options set is used to create the list of checkboxes. Then the user checks or unchecks some of these checkboxes. Then the idea is to save the selected options in the database as part of a new thing.

I can either save all the options if the filter condition is set to “yes” or none if it is set to “none”. I can filter to save 1 option based on some text. I can’t find how to filter based on the checkbox checked or unchecked.

Yeah, so if you have some list visualized in a repeating group and in the cell you have some checkbox, there’s no expression that can give you the values of the checkboxes. (There are workarounds for this that I won’t go into here for the sake of brevity.)

However, you get an event when the state of those checkboxes are changed (“When an input’s value is changed…”)

So, the typical design pattern in Bubble is to have a workflow that triggers off of that and adds current cell’s whatever to some list (typically held in a custom state) if the checkbox is checked (using :plus item) and removes the whatever from that list if the box is now unchecked (using :minus item).

That is, you don’t “filter” the list being visualized, you dynamically construct a list of just those items that have been selected.

Ok thanks. I understand. Hoped I could just filter :wink:

This topic was automatically closed after 70 days. New replies are no longer allowed.