I have an inline list of exercises that I want the user to filter using the parameters: Area, Type and a letter search.
I created the USC and filtered the list accordingly.
My problem is when all the parameters are empty I want the list to show in full, the reality is it only shows the empty values that match.
The area and Type parameters are set to allow choose multiple, that’s why I use “is included in”
When everything is filled the list is searched correctly but when something left empty it does not show all the rows.
Plugging my own template is not ideal but I had published this template as a proof of concept for filtering a list with multiple parameters: Salary Benchmarking Template • Glide
Maybe this will help you think about how to set it up.
But I see you also don’t show all values when all parameters left empty.
Yeah. All the values in the choices are required for the filter to work. But should be easy to do with conditional visibility. If none is selected, show another list with all items.
I had that solution but I have in total 6 parameters. and they all open new screens.
Maybe you might test my idea in these cases and make simpler the logic.
Take a look at it here Multi Filters using Relations: a new way 💡
This is working great!
Now I need to think how to add the multiple option
Hola de nuevo!
What do you mean with “add the multiple option”?
My example has a choice using a multiple selection option too!
Glad to know it helped you.
I see only in the OR multiple selection.
I need AND but only the area parameter can have multiple choices
Here’s my attempt to use XC to solve this.
My column takes 3 inputs: joined filter list, category list, and delimiter (default to comma).
I automatically trim each item in the filter/category list, this is also case-insensitive. The two lists’ orders do not matter.
If the filter is empty I return a true value.
Link to use:
Hi @Lin_Altshuler, I am confused
Do you want a mixture of these 2 cases? I mean: your goal is to have several parameters ruled by an AND filter but one of those allows selecting multiple?
Ah now I read Lin’s response again I’m confused too…
I was thinking to filter multiple choices by an AND logic for what she calls “area parameter”.
For your question, I expect an AND between different categories. Does that answer your question?
Sorry @ThinhDinh … I tagged you accidentally
My question is for Lin Altshuler!!
Ok I will try to explain/
The multiple choice in one of the parameters in an OR and the condition with the rest of the parameters is an AND.
Area (multiple selection) Quadriceps or Hamstrings or Gluteus Maximus
You know, I don’t think you need a complicated solution with relations or anything for this. Just a couple of single value columns and a single if-then-else column should do it.
Create these three columns in the table that contains the data to be filtered:
- Single Value column that takes the user specific Type choice and applies it to all rows
- Single Value column that takes the user specific Area choice and applies it to all rows
- Now an if-then-else column:
– If Type is not sv/type-choice, then blank
– If Area is included in sv/area-choice, then true
Now you can use that if-then-else column to filter your Inline List of results, showing only those rows where it is true.
I haven’t tested this, but I believe it should work.
As long as the area column that is compared to is a single one, I believe this approach should work.
I.e there’s not one workout that belongs to both Quadriceps and Hamstrings.
yeah, that did occur to me.
It could also fall down if you had a value that is a subset of another value. For example if you had one called “Hamstrings” and another called “Hamstrings foo” (bad example, I know).
If that was the case, then you’d probably have to go back to the split text/relation approach.
thought you programmers wouldn’t know
What are you talking about???
I work out every day!
(on my keyboard)
Not quite sure if this is the solution to your problem.
Don’t worry about the relations.
2 choice components and 4 inline lists
- Select an OR exercise category. show all, if none selected.
- One OR leads to an AND multiple selection of OR/AND instructors, each selection opening the classes they are responsbile for.
- If no gym instructors selected, show all classes.
I hope I have understood you correctly. We are all trying our best!