Dynamic filtering in Bases using user-defined input fields (like metadata)

Is it possible to add input fields in Bases to filter the current base based on user input?

I know it’s possible to do this through the filter menu, but what if I have a filter that depends on a year? Then I have to open the filter menu, find the current condition, and edit it manually. It would be great to have something like metadata fields for a note instead.

Right now, it’s possible to achieve a similar result with Dataview — I can set metadata, read it in code, and do whatever I want with it. Easy to read and edit the filters.

After you released the group by functionality, that’s the only reason I still use Dataview. I’d love to get rid of it.

Thanks!

Hi.

I use a regular property for this:

filteryear: 2025

And then use this in the base:

file.name.contains(this.filteryear)

If I change the filteryear value in the note, the base updates dynamically. I don’t have to edit the base at all.

Yes, and here is the point. You have to create another note to handle a base. What if you have 20+ bases? That is not so easy :slight_smile:

Just imagine. You collect funny moments of your life. And after few years of filling notes you want to remember what was with you in 2019. You open your base and see fields with names you left for filters. Let it be “Year” and boolean “Show Hidden”. You don’t need to remember what filters do you have/set because you see them right after you open the base. You just enter 2019 instead of 2024 entered last time, click “Show hidden” and boom baby. Beautiful!

My question was about .base but I didn’t know I could use base inside note. Now I understand your reply.

Thanks.

1 Like

And the great thing is that one base can be embedded in any number of notes, so if a base ever needs to change, it only needs to be changed once.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.