Repeating Group not reading yes/no dropdowns

My ‘User’ data type has a lot of yes/no fields

On one page I have a dropdown with static options:

An example of that dropdown is ‘is the user a producer?’

I also have a repeating group searching for users where
Producer status = Dropdown’s value
but I’m getting an error and not sure why

The dropdown is for TEXT fields. The best input to use is the Checkbox. The expression in your “Search for Users” filter would be:

Producer Status = Checkbox’s value is yes

Lmk if this helps,

Thanks. Just tried the checkbox but I still have an issue - now if the checkbox is unchecked it won’t display any users who are producers which is not what I want. Basically, I want it to be a list of all users whether they are a producer or not and to only change the list displayed in the repeating group if the box is checked. I don’t want unchecked to mean they are not a producer instead I want unchecked to mean the person filtering results doesn’t care if they are a producer or not. That’s why I was using dropdowns cause if the user doesn’t select anything then it has no effect. Is it possible to do what I’m after with checkboxes or something else?

Yes. You’ll have to use a conditional statement in the repeating group so you can change the data source depending on the checkbox’s value.


Initial Data Source - Everything you currently have

Conditional #1 - When checkbox isn’t checked, search for everything you currently have EXCEPT for the producer constraint

Does that make sense?

So I tried it and it works for one checkbox but I have about 10 checkboxes (you can also check if they are an engineer, if they are a teacher, etc) so it doesn’t work. What would you suggest?

I see. This may be a bit challenging. You may have to adjust your approach. Instead of 10+ yes/no fields, instead, create a new Table named “Filter” or something like that. The only field you need for this new table is a text field (we’ll name it “Title” for now). Examples of a Filter would be Producer, Engineer, or Teacher.

Now in your User table, create a new “List of Filters” field. Users can add Filters to their “List of Filters” field.

So when searching, instead of having 10+ checkboxes, you only need a repeating group with the data source being “Search for Filters”. Inside each cell of the repeating group, there could be a text element (to display the Filter’s Title) and a checkbox icon (to show if the Filter has been selected).

To complete this, you’ll need to create a custom state (we can name it Selected Filters). When a Filter’s checkbox icon is clicked:

  • If Selected Filters contains this cell’s Filter, remove it from the Selected Filters list.

  • If Selected Filters doesn’t contains this cell’s Filter, add it to the Selected Filters list.

Now when you’re filtering Users in the User repeating group, the only constraint you’ll need is through an advanced search:

Current User’s List of Filters intersected with Selected Filter’s count is equal to or greater than Selected Filter’s count.

This expression means that only Users who have at least all of the Selected Filters in their List of Filters will be shown.

This means no Users will show up when the page is loaded. This is where you use the conditional statement in the User’s repeating group:

When Selected Filters is not empty, you use the advanced search. When Selected Filters is empty, you show all of the Users, regardless of their List of Filters.

I know that’s a lot to digest but please go through this step by step. It’ll work!

1 Like

I can try that but I just thought: if the filters are texts now and not yes/no - What about just one multi-dropdown of all the filters instead of checkboxes and the repeating group can just be - search for user’s filters that contain Multi-dropdown’s value

You can do that as well. It all depends on how you want your design to look.

Even though they’re now texts tge repeating group doesn’t want to get more than 1 filter from the multidropdown. It works if I don’t make a filter it’s own data type but just a field of texts on the user instead. I’d rather it be it’s own data type though cause then i can search for filters for other things on the site instead of typing them every time. Might have to try the custom states on the checkbpxes but i love the look of the multidropdown so if you can think of a way to let the repeating group get more than 1 thing from a multidropdown of filters let me know.

That’s why you use a repeating group & custom states. This allows you to select more than 1 thing at a time. If you look at the image below, there are 3 filters that all use repeating groups.