Automate a search with multiple metadata

Hello everyone,

I’ve come to see you because I can’t manage to automate searches with specific metadata. For example, I can’t find all the tags that have the resolved status and that belong to the LINUX category.

I managed to get what I wanted via the default tool using this command ([“context”:grub) ([“state”: “OK”]) but I’d like to be able to automate it so that I can have a prompt displayed with the value of, say, context and the value of state.

I tried with the quickadd plugin but for some unknown reason when I want to put a custom script I don’t want to do it when I press add nothing happens. After some research, others have had this problem before me, so I decided to look for another tool, but I haven’t yet found anything that can help me.

I know that the templater tool lets you insert js code and that would theoretically give the expected result, but I don’t program in js.

If anyone has any clues, or a plugin that could help me because I’ve tried a lot but so far without success …

Thanks in advance

Automate searches?
Is it not Dataview what you want?

One option could be to use Meta bind plugin to update some properties, which then again are used by Dataview (or similar) to generate a generic search providing you with your wanted result.

Then you could use a select list for your various contexts, and an input field for the state part (if that’s not also fixed and could be chosen from a select list).

Hello,

Thank you for your answers,

I already use dataview and indeed I think dataview can play a role but I’m not sure they allow to display an input that will adapt dynamically.

In fact, I’m sharing my notes with someone who has fewer opportunities than me to learn how to use Obsidian properly and how it works, so I have to make things as easy as possible for him, and I think that setting up a dataview if it means modifying it by hand can be complicated for someone who isn’t used to it.

Hence the idea behind quickadd, which apparently allows you to display a prompt that adapts the search conditions by itself.

Indeed holroy what you say seems to correspond with what I’m looking for I just need to learn now how to use the plugin correctly I hope it’s not too complex

Yes, the method suggested by holroy can work.

I’ve seen this done before:

But when I went to have a look at the GH page, I can’t see the full implementation with the md file anymore, complete with the example frontmatter to be used with Meta Bind plugin.

Actually, about a year and a half ago, I managed to get a hold of a fork of this and implement stuff for me I don’t really use anymore.
I am not even sure anymore if that fork contained the Meta Bind implementation or if it was from this forum or it was my own idea I made with ChatGPT…?

But it can be helpful for people.

I upload the zip and try to guide peeps through what is need to be installed and what parts to exchange.
noteslist.zip (8.6 KB)

Needed plugins

  • Meta Bind
  • Dataview
  • Obsidian Columns

Optional

  • Force Note View Mode
    • So when you enter the note, it will set you on Live Preview or Reading Mode.

Contents of zip

You can keep the files in one folder, no need to put the css in snippets folder.

  • markdown file to initiate searches from
  • css for styling
  • js file with the dataview magic
  • enclosed original view.js file of the fork as well

Setup

Download zip, extract it into some dedicated queries folder of your vault. Folder name can remain ‘noteslist’.

I’ve enclosed in the md file some of my old setup and you will need to exchange and add to it your own folders and information.
You can add to the multiSelect for tags and folders.
At the bottom of the page dv.view("SYSTEM/QUERIES/noteslist" must be changed to your own path.

irrelevantFolders, excludeFolder in the embedded dataviewjs need again be changed…

How it works

You set up your own query with the Meta Bind buttons.
When you change something with buttons (works only with in Live Preview), the properties of the note will update and those will be picked up by the DVJs query, which then will call another DVJs query and display the results in the file, like shown in the link above.

Caveats

Meta Bind doesn’t play well with Obsidian Columns (used to make the whole thing more compact) in Reading Mode. So users need to use Live Preview. You can force Live Preview with the optional plugin.
Alternative would be to use Efemkay’s modular CSS, with its own syntax, but it has a way of slowing down larger vaults, so I cannot recommend it for the long run.

My own implemenation uses only one view mode and even that was customized, so the frontmatter of files are not shown, etc.

Recommendations

Currently, this project – while it has its advantages with Evernote style results – doesn’t do too much for me, so I use custom Datacore queries instead, based on the Para+Zettelkasten demo vault’s DC query:

But the above can be still good for 2025 and beyond, and to play with plugins, understand about how stuff works.

As I said, it is currently quite lean for setup but can be enhanced for custom properties like status, etc.
Also, because of the way the original queries worked (to query full vaults), only exclude folder functionality works, not include. This makes it a bit tricky, if you have 60 folders and want to query 1, but there is the ‘irrelevantFolders’ array, which you add folder names to, so it makes it all a bit more manageable.

Recommendations 2

There are plugins I never really tried…

  • Note Gallery
  • Image Gallery
  • Page Gallery

…that can be used by people who don’t want to learn or use Dataview(js), but of course probably you won’t be able to have the same control you can have with scripting.