I use QuickAdd to give me the ability to add variables to notes when I refactor. i.e. I have a simple QuickAdd macro that calls the “refactor note” hotkey and then calls a QuickAdd “capture” that calls a front matter template, prompts me to enter the information, and adds the completed front matter to the top of the refactored note.
I would also like to have note_type, note_bucket, and note_entity registered as tags in the front matter.
(Caveat -I am not a coder, but I’m slowly learning how to do things in Obsidian.) I can’t figure out the correct way to set this action up. I thought adding:
I need to start out by saying I am not a coder either. Had a similar question and found a guy on you-tube that helped me make my system work. Here is an example from a template I set up for recipes files
I take these as hints for what tags I want to use. The important thing for me is to have a dropdown - suggestion as you would if you used tags regularly. The format is the key, square bracket, quotes, space then tags with hash as usual. With my system these are jumping-off points, as I write the note I change the info to suit. Most of my tags are 2 levels, so I may have #Meal/Mains, that starts here as #Meal. Not certain that it helps you as much as you were hoping, but maybe a place to start?
This is the video that helped when I was setting this up, perhaps it gives you an aha! moment too! How to use YAML in Obsidian correctly - YouTube starting at 7:00 for dealing with tags.
Good Luck
In case it is useful, I thought I’d share my understanding of what is going on here. QuickAdd {{VALUE:my-answer}} saves the result of the prompt in my-answer, so you can then re-use that result with {{VALUE:my-answer}} elsewhere in your capture/template. You can do something similar if you ever need to do a prompt for a date with {{VDATE:my_date_value}}. (Your stored VALUE names are much better than my examples, since they actually describe what is saved in it!)
Random note: As someone with some coding knowledge but not very much QuickAdd knowledge, I am a little surprised that spaces in the names of saved VALUEs work correctly! But if it works, it works.
I’m glad this helps you. I understand what you’re saying about the spaces. I started teaching myself Python a few weeks back for something different to learn, so understand more about variables.
Apparently, in the case of QuickAdd format, the {{VALUE:note type}} actually corresponds to triggering an input box for a variable, where the input box has a title shown as “note type”. So “note type” is, I guess with my newborn knowledge, actually, a string assigned to the title of the input box, it just doesn’t have the quotation marks around it.
I think I misunderstood…so ignore what I’m telling you about understanding what you’re saying about spaces. It may just be that the variables are being listed in order. Let me try a couple of things real quick…Okay have a look at the screen shots below, the {{Value:note type}} appears to allow identification of, thus reading from, the variable note_spaces. I’m not sure of the synx to just display a variable in QuickAdd; I’ll look at that later today when I have a break.
The bottom behavior: that if you give the variable names after VALUE new names then you get new input boxes, makes sense to me.
If you rename all variables inside {{VALUE: }} to use underscores, does the behavior make sense?
But that doesn’t work with data view, I assume because QuidAdd just lays down the text and so now my taxonomy is not assigned to any data view accessible variables in the front matter. It also doesn’t tell someone looking at the note the string to which a particular variable is assigned.
It would, however, be fine for tags, but then you would just discard the top and use:
Thanks for sharing all of these! I am glad the results are more consistent now.
Exactly!
If you do not like underscores, maybe you could call your dataview fields “bucket” or “nType” or something? They do not have to match the names in the text that QuickAdd lays down. Still no spaces though.