Formula: filter on entire table

Hello,

I am working on registration system for a small music school. We have music teachers and sections, a teacher being able to teach different sections (various instruments and workshops) and sections can have several teachers. And we have our users that can choose a section and a teacher.

I have 3 tables : a ‘teachers’ and a ‘sections’ tables that have a link to each other and the ‘registration’ table that gathers all the users choices and has links to the ‘teachers’ and ‘sections’ tables.

I would like to have a fourth table that lists all the users for each teacher/section pair more or less automatically. I am not sure how I can setup this table:

  • the first two rows are respectively the teacher and the section. Ideally, an automatic fill of each possible pairs would be nice but it can be made by hand
  • more important, I would like to list all the users of the registration table matching each pair teacher/section. Is it possible to filter the whole registration table against the value of the teacher and the section values? I put a link to the registration table but it is expecting a manual selection. Would it be possible to automatically fill the link with the whole table that I could filter in another formula column?

An automation system like n8n could do the processing but I would like to keep things inside baserow as much as possible.

Thanks,
Nicolas

1 Like

Hello @Nico-L, first of all, welcome to the Baserow community :wave:

Apologies for the delay with the response!

Is it possible to filter the whole registration table against the value of the teacher and the section values?

As for now, it’s not possible. As soon as we release advanced filtering combining AND & OR, it will be possible. This issue has a high priority, so it should be released soon: Condition groups: advanced filtering combining AND & OR (#1271) · Issues · Baserow / baserow · GitLab.

And @Juliet is checking your use case to answer the rest of the questions, she will get back to you shortly :raised_hands:

Hello @olgatrykush ,

Thanks for your return (I was on holidays last week, so no worry for the delay :slight_smile: ). Glad to see advance filtering is coming soon. It will help, but I am not sure yet that I could perform the filtering inside baserow.

We’ll see. Thanks.

Hi Nico,

I think this is very possible to setup in Baserow right now if you slightly change how you are structuring your database.

I’ve invited you directly to an example database via email but my idea is:

  1. Have a teachers, sections and registrations table like in your original example
  2. But instead of linking teachers directly to sections, make a new table called something like “Teacher in Section”.
    1. This new table will have a link to Teachers and a link to Section
    2. For each section a teacher teaches in, you add a new row which links to the teacher and the section.
  3. Now in the registration table, you link to the “Teacher in Section” instead. So each registration is always for a specific teacher in a specific section.
  4. Finally, simply by structuring your data with this extra table, I believe you get the exact “filtered” columns you wanted in the first place:




Edit:

If this doesn’t work, then it also sounds like perhaps lookup fields + the filter formula function might help?

Hello @nigel,

this is a very insteresting idea! This will probably do the trick. I’ll have to dig it a bit to make sure.

Thanks,
Nicolas