Obsidian and the great plugins like dataview, templater and stuff can be a bit daunting: I see their potential, but for someone whose only experience with programming/scripting lies back 20 years, when my school offered courses for turbo pascal, it can be very hard to use them. The plugins are great - their documentation is not that beginner-friendly No insult intended: you plugin-devs are great!
My Intend
- Having a weekly note template that contains a automatically generated agenda with upcoming events, meetings and whatever for that week. (will do the same for monthly notes likely)
- a similiar problem was posted here: List notes within a weekly/ monthly note that have a due_date or do_date fall within that particular week/month
- since this might not have come to a workable solution for the original poster, here now my “low-tech-for-dummies-solution”.
- I am using the calendar-plugin, periodic notes and dataview.
What was the problem and how did I solve it?
- I think the problem was, that there wasnt a straightforward way to convert the weekly-note-title to a usable date format: for daily notes, you can simply use the {{title}}-thingie to feed the title, which is recognized as a date into the date-function and compare with field-values. Since the title of weekly notes is something like “2021-W52”, you cant use the title to simply compare dates and I didnt find any easy way to convert this into a date. Thus, in the thread linked before, some helpful and competent person suggested to use the creation date as a reference - which obviously has the disadvantage that I want to be able to generate my weekly notes at any given time.
- My workaround: Each weekly note has in the frontmatter now the first day of the week as a date in the format yyyy-mm-dd (as have my daily notes). This is achieved by adding “datum: {{monday:YYYY-MM-DD}}” to the frontmatter. This basically assigns the field “datum” in the note the value of the specific date of the first day of the week in question in the specified format.
- next task was to have a dataview-thingie in the template that generates the table (or list or whatever you want).
I only give here the “where-part” (which might cause the hickup for many newbies like me and will then supply an explanation.
Here is the clause:
WHERE Datum <= date([[{{title}}]].datum) + dur(1 week) AND Datum > date([[{{title}}]].datum)
My personal hickup was, that I didnt know how I can compare the value of a field in a specific note with the values of the field in other notes. So for my fellow dummies:
- [[fancy-note]].datum refers to the value of the field “datum” in the note with the title “fancy-note”.
- “datum” is just my field for dates (I am from Germany).
- the {{title}} in the template is replaced by the note-title, when a note based on the template is generated.
I guess, many other applications are possible for people like me, who dont want to get into templater-plugin and other stuff right now. I am sure, templater and other plugins offer way more elegant solutions.
Best NGO-Guy