How is it possible to hide a specific file from a Dataview query?
I have created a list of shortcuts which I want to be filtered by the “software” criteria
which I have added as metadata.
for some reason, the file “shortcut MOC” is also appearing on the list even though it doesn’t have any metadata attached to it.
Is it possible to subtract only this file instead of filtering by using a WHERE filter?
this is my Query -
and the attached file is the results I get:
One way to do it would be to add another line to your query
where software, which would require that field to have a value.
Another useful query extension would be to add
WHERE file.path != this.file.path which eliminates the file the query resides in from the result set. Often found in MOC type of file queries.
Pretty sure you can do it from “FROM”
FROM [[yada yada yada]] AND -[[shortcut MOC]]
When you say, “Is it possible to subtract only this file,” assume you have a specific file “Shortcut MOC.” I am satisfied omitting files from Dataview queries this way:
Identify the folder where I want to hide files from being listed by Dataview. In my case, this was “Projects.”
For each file I don’t want to list, add a key, “list” and set it to “false.” E.g.,
Then write my dataview query something like this:
table status, priority
WHERE (list != "false")
sort priority desc