Dataview If File Contains

Trying to find all files that contain “1ld” but this returns nothing when I add the contains line
What obvious thing am I doing wrong?

table maintain as Task
FROM #Journal and -"zzzTemplates" 
WHERE date(tomorrow) - file.ctime <= dur(100 days)
and maintain
and contains(file, "1ld") = true
sort desc

What’s “file”? Any created field? Or an implicit field like “”, “”, …?
What’s “1ld”? A value in a field called “file”? Or a content inside any file?
For now dataview works only with metadata, not content (except for “tasks”, where content is considered as field text).

1 Like

So no way to dataview for all files that contain a certain string


If that string isn’t inside a specific field, no.
For example, if you use an inline field like “summary::” for literature notes you can filter to a specific word or string inside your summary content. Without the “key” for field you can’t (for now - it’s on dev roadmap).

1 Like

By “file” do you mean an attached file? You cannot search those

But you can search the contents of a Note using the Vantage search plugin. I don’t think you can do that with Dataview but I am not certain there.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.