Multiple Filters with "Chip Component"

Hi there,
I’m trying to filter a database using the chip component for an event management app
I want to filter events by year and if it’s paid or not, so it must be a multiple-selection filter.

:arrow_down:I tried with arrays, and if then else but I don’t know how to achieve my goal :woman_shrugging:

Firstly, an observation. Your Event column is User Specific.

CleanShot 2023-05-17 at 21.59.19@2x

This means that the data in that column will be different for every user of your App. That may or may not be what you intend. I don’t know.

Okay, the filtering. Several ways to approach it. Here is what I would suggest:

  • Firstly, it looks like you’re using a Single Choice component for both Year and Payment Status. This makes things unnecessarily complicated. So I would suggest splitting that into two components - one for the Year and one for the Payment Status. Each should write to a separate User Specific column.
  • Next, add two Single Value columns (like you have now) - one for each, that applies the selections to all rows.
  • Next, I’m assuming that the Year should be multi-select, and Payment Status should be either/or (single select).
  • Create a Split Text column on your Year selection to turn that into an array.
  • Create a relation column that matches the array column with the Year column.
  • Next, create an if-then-else column:
    – If Single Value Status is not Status, then null (leave empty)
    – If relation is empty, then null
    – Else true
  • And finally, apply a filter to your Collection to only show items where the if-then-else column is checked.