Not sure it’s the most efficient, but it’s what came to mind. If you find a cleaner way or notice an occasion where that doesn’t work, I’d love to know about it! And I could try to fix it.
Alternatively, if typing out each property, you could do:
Dawni, I only tested the first part of your filter, because I’m only interested in notes with empty properties. So I added the filter note.values().filter(value.isEmpty()). It works, but Bases returns error: “Failed to evaluate a filter: Cannot find function “isEmpty” on type Boolean”.
But, again, it still works.
Thanks for pointing that out! That actually means the filter misses some empty properties. To my understanding now that you’ve pointed out that error message:
When a note has a checkbox property with a value (either true or false but not null), my filter will reach that error and stop evaluating the note. If that same note has a different property that is empty, for example:
---
textCheckbox: false
aliases:
---
… then the filter might not “see” the empty property, and the note won’t show up in the results, even though we want it to.
I can’t immediately think of how to fix it wholesale—that is, without manually separating checkboxes from the other types of properties.
This is a case where a .type() function would be handy.
Well, v1.9.7 gives us a better solution. (Released right about the same time I posted the above, lol.) I think this covers Astrolupo’s situation with no error messages: