Use Metadata Menu and Dataview to tag your notes from a selection of existing tags only

Published Oct 28, 2022

I hate manually tagging things.

I inevitably write a tag slightly differently from previous uses. Suddenly, I have two tags: e.g., changemaker and changemaking, or knowledge and Knowledge.

Or I’ll forget a tag, even if I’ve used it extensively in the past. This results in posts about productivity that aren’t tagged with productivity.

So, I’d prefer that the computer managed most of the tagging for me. My ideal workflow is to choose from a list of selected tags. In the past, this is how I’ve handled tagging in DEVONthink. Now I have a way of doing it in Obsidian, too!

The workflow requires the Dataview and Metadata Menu plugins. Install and enable both. Then, in Metadata Menu, add a new Preset Field.

Give it the name “Tags”, make it an “Accept multiple values from a list” field type, and finally choose “Values returned from a dataview query” as the source of values.

Finally, provide the dataview function here:

dv.pages() => s.slice(1)).distinct()

Then, you can use Metadata Menu’s commands to tag your notes. When you add Tags, it will automatically give you a list of tags to choose from — a list of all the tags used elsewhere in your vault.

Here’s a video of the workflow

(As you can see from the list in the video, I now have to clean up after my manual-entry errors…)