What I’m trying to do
I want to create a “cockpit note” in which I can monitor which of my notes still don’t have any links, sorted from the latest ones I’ve created.
So the idea was to have a note with a Dataview query in which I pull notes which don’t have any inlinks nor outlinks, sorted by latest creation date, and limiting to the latest N notes (3, 5, 10, however many).
Things I have tried
What I found, after many searches, was the following query:
list
file.cday
FROM ""
WHERE length(file.outlinks) = 0 AND length(file.inlinks) = 0
SORT file.cday DESC
LIMIT 3
Seems about right, except that the creation dates are totally out of whack, as can be seen below:
(Before it is proposed as a solution: no, I don’t use notes with dates in their names anymore, these are old files. Nowadays I create notes without any dates in their names.)
I should add that my notes are all created with a template that has a Date
metadata, which apparently seems to affect the file.cday
info.
For instance, the first file displayed in the query above has the following metadata (`Date is filled automatically with a {{date}}):
Something I’ve stumbled across was this post: Dataview - file.day attribute - #4 by svenschuldt. If it is of any help, here is the result of the queries proposed by @mnvwvnm:
Something else I thought about, after many searches, was to just filter based on the Date
field directly. But it doesn’t seem correct either, since it doesn’t show any recently created files without links (which I know exist):
list
Date
FROM ""
WHERE length(file.outlinks) = 0 AND length(file.inlinks) = 0
SORT Date DESC
LIMIT 100
I used LIMIT 100
to show its weird behavior:
Anyway, that’s as far as I could come up. It seems like such an easy thing to do, and yet it seems so convoluted to do, with no straight-forward code snippet anywhere online (as far as I could find). I’m sorry if it’s a dumb question, as I’m pretty new to the whole Dataview thing (as well as posting a question in this forum). Thanks!
PS: edited just to blur the files’ names