Is there a way to fetch latest 10 notes sorted by modified date ?
search only provides these options
Is there a way to fetch latest 10 notes sorted by modified date ?
search only provides these options
With dataview:
```dataview
LIST
FROM ""
WHERE date(today) - file.mtime
WHERE file.name != this.file.name
SORT file.mtime DESC
LIMIT 10
```
Works as you need?
Angel
@anon12638239 It works, but I use a plugin called “Zoottelkeeper”, which automatically updates index files inside every folder.
So, it shows up those index files also.
Is there a way to exclude certain files ?
I tried
```dataview
LIST FROM "" WHERE date(today) - file.mtime
WHERE file.name != this.file.name
OR "🏷 AREAS 📂"
OR "🏷 Crypto 🧊"
SORT file.mtime DESC LIMIT 10
It does not gives any parse error but does not exclude the files.
@anon12638239 Figured it out. This works.
LIST FROM "" WHERE date(today) - file.mtime
WHERE file.name != this.file.name
AND file.name != "🏷 AREAS 📂"
AND file.name != "🏷 Crypto 🧊"
SORT file.mtime DESC LIMIT 10
can we use wildcards like
AND file.name != "A*"
where all files starts with A are included ?
LIST FROM ""
WHERE file.name != this.file.name
WHERE contains(file.name, "🏷")
SORT file.mtime DESC LIMIT 10
This feteches only files starting with
But, is there something equelent to “does not contain” ?
As you have worked out, specific files and folders can be excluded or targeted. Not sure about wild cards, and not on a device with Obsidian on to be able to test anything, but you might be able to do some filtering with ‘contains’.
Angel
@anon12638239 Figured out
!contains
works
LIST FROM ""
WHERE file.name != this.file.name
WHERE !contains(file.name, "🏷")
SORT file.mtime DESC LIMIT 10
Was just back at a Mac and about to try to help, but you crossed the line ahead of me. Bravo!
Great it is working for you.
Angel
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.