What I’m trying to do
Hi everyone,
I’m trying to create a Dataview table in Obsidian that includes files based on specific criteria and also excludes certain files. Here’s what I’m looking to achieve:
- Include Files: The table should include files that:
- Have the frontmatter field
"Home"
containing"Note-making MOC - MDR"
. - Are located in the directory:
"00001. Zettelkasten System/0003. Notes/001. Reference Notes/Fleeting Notes"
.
- Exclude Files: The table should exclude files that are already linked in the
"Note-making MOC - MDR.md"
file located at"00001. Zettelkasten System/0002. Maps of Content/Note-making MOC - MDR"
.
Essentially, I want the table to show me what files I have marked in the "Home"
frontmatter as "Note-making MOC - MDR"
that haven’t yet been added to the "Note-making MOC - MDR.md"
file.
Things I have tried
TABLE without ID
file.link as "To Add to a MOC - Note-making MOC - MDR",
round(max(0, (date(today) - date(file.ctime)).days)) AS "Days Live"
FROM
"00001. Zettelkasten System/0003. Notes/001. Reference Notes/Fleeting Notes"
WHERE
contains(file.frontmatter["Home"], "Note-making - MOC")
AND
!contains(file.path, "00001. Zettelkasten System/0002. Maps of Content/Note-making - MOC")
AND
length(filter(file.outlinks, (l) => l != "[[00001. Zettelkasten System/0002. Maps of Content/Note-making - MOC]]")) > 0