Searching this forum for similar questions and answers
What I’m trying to do
I’d like to know how to cycle through a set of preset values for a particular field. I understand that this might not be possible natively in Obsidian, so willing to use a macro from Keyboard Maestro to assist.
For example I have the following field in my file:
status:: now
On pressing a hotkey I’d like the status to change to the next status in it’s sequence e.g. next. A sample sequence would look like the following (and would loop) now → next → later → someday
I have some very basic programming knowledge so my 1st thought was to create a python script to parse the whole file that I’m in, look for the field, look for the value and then cycle to the next one. I’d do all of this outside of Obsidian
The next idea was to somehow access the filed via Obsidian itself? Maybe it’s API? Not exactly sure on where to start on this one.
An alternative solution would be to have autocomplete / suggestion for that field. i.e a list of statuses appear when clicking in that field.
If u want to go the autocomple route, perhaps Completr or Autocomplete.
That said, i suggest consider nested tags for your statuses like #status/next. There’s few benefits doing so
it’s natively supported (no need community plugin)
it has autocomple built-in. Not the level of cycle thru but if u delete until #status/ u r presented shortlisted tags (instead of all available tags)
u can click on the tag pane to list/search
if u use Dataview plugin (or Tag Wrangler or Tagfolder), you can work with nested tags as well with these plugins (to enhance experience for item #2 & #3 above)
I meant for writing a small script to manipulate a note. So not a full blown plugin, but perhaps using the API to make a change to the current document - just thinking out aloud