How to tell base: 'does not contain' part of a value of a property?

What I’m trying to do

I have learned how to get base to give me notes that contain part of a value in a certain property in this thread: Base 'contains' doesn't catch properties unless exactly that value - #5 by dawni
Now I want to do the opposite: All the notes that do not contain that part.
I’m a farmer, so I keep track of what I can sow and what I have sown through Obsidian. For example, I want to have a table with all the crops that are from a certain group (easy to define in properties). I note down dates when I sow a crop in a certain property (sown_date) - as a text value written in the date format YYYY.MM.DD. I want to exclude all the crops I have already sown in 2026 - including 2026.01.15 and 2026.02.03 for example. This is the reverse prompt of the above thread.

Things I have tried

I have tried putting a ! before the code, but this didn’t work. I think also base excludes all the notes that do not have that particular property. I want those included. I just want to exclude those that have the property and where the value includes something with e.g. 2026.

Give this filter a try:

sown_date.filter(value.contains("2026")).isEmpty()

It returns all notes that don’t have “2026” in the sown_date values.

If you have trouble combining it with the rest of your filters, say what the others are and how you’re combining (your All/Any/None groups).

1 Like