Hello, I’m building a TODO list application with different categories. I want the list to filter automatically based on the choice selected choice by the user.
I have used visibility and sort but It’s not working.
Okay, one thing you didn’t show in your video is how your choice component is configured.
Anyway, that doesn’t matter. You can get what you want with a single inline list. Here is how to do it:
Firstly create a User Specific text column in your Task table. This column will hold the selected value of the choice component.
Next, create a Single Value column. This will take the value of the user specific column and apply it to all rows in the table.
Finally, an if-then-else column. The purpose of this one is to apply the filter logic to each row. It will return true for any row that needs to be filtered (excluded) from your list. It should be something like:
– If single value is empty, then empty (this is when we want all rows)
– Else if Task category is not single value, then true (if it doesn’t match the selected category, then exclude it)
Now you just need a single inline list component, and set the filter option to “where if-then-else column is not true”
I don’t know if I missed something on the way but I had done easier (assuming that Paul will use an only one Choice component).
The InLine List supports a multiple relation as a data source so, let’s use it!!
1- Create a USC to hold the category selected by user
2- Create a multiple relation using the above USC with Categories table’s Category column. Let’s name it “rel_Cat”
3- Put your InLine List and set its data source (Sheet Source) to work with “rel_Cat” relation
4- Enjoy the solution
But if @paul_Okoduwa is going to use 2+ choices later to get a dynamic filter, the steps showed by Darren or Robert in his video are good choices although we have a plan B as well.
Yes, there are several different ways to approach filtering. But in this case I don’t think creating a relation is necessarily the best approach. The problem is that it will return no rows when the choice is empty, which is the opposite to what Paul wanted (all rows). So to make it work you’d either need to create additional logic to handle that case, or use a second inline list component.