FILTER DATA with CHOICE results empty when no selection (user-specific)

I’m building a calendar of events in List View.

To allow each user to filter the events displayed in the list by the school name, I created a user-specific column = FILTER SCHOOL.

With the element CHOICE, users can select one or multiple schools by and this will populate the FILTER SCHOOL column.

If School A and D are selected, FILTER SCHOOL would display this:
School A,School D

Works well with FILTER DATA with the following settings:

  • SCHOOL NAME is included in FILTER SCHOOL

However, the list is empty when no school is selected.
FILTER SCHOOL would display this:

This has been annoying me for years…

Any help?

You need to add an OR condition that checks if the FILTER SCHOOL is empty. If it’s empty, then it should show everything.

The thing is that I also want to filter the school status (ex: if the school is open or closed) and for that I would need to use AND.

The moment I use OR, I’m screwed…

Ok, in that case I would move the logic to your School table. Is School status something that the user selects as a second filter?

I would do something like this. First create a Single Value column that will populate that choice value across all school rows. Then create an IF column something like this:
If School is Closed, Then false
Else If FilterSchool is empty, Then true
Else If FilterSchool is included in School, Then true
Else false

In the end you can simply use the true false value from your IF column for your filter. Then you only have to mess with one filter condition instead of multiple, and you are not restricted to only AND or OR.

1 Like

I keep repeating myself but this is the biggest drawback for me…
Is is that difficult to code?

There is nothing to code, it is just logic.

Jeff already described how you would configure it - did you try his suggestion?
Did it work? What was the result? How was the result different from what you wanted?