Failing to make a table for a week note that automatically pulls data from its component day notes (didn’t know how to make the title shorter). I have the periodic notes plugin that automatically generates files, so the entries need to be dynamic
in Weekly note:
TABLE (date:: key of the daily notes in the 'daily notes' file path) as "Day"
FROM "notes/...weekly notes/daily notes/
I want the output to look like this within the weekly note
(also, each day is a link to the appropriate note)
I know I can use TABLE WITHOUT ID to hide the file names, but Ill also need to convert the YYYY-MM-DD fromat to dddd format. one of the issues is that the weekly note is also being procedurally generated (along with monthly and yearly notes)
Things I have tried
I have tried messing around with the code, and looking at the API and other help documents, but there is no straight answers
I already have that plugin, it doesn’t transfer data or use dataview; just creates notes automatically, which is the reason why I need a more sophisticated solution
I use the following in my weekly note to generate a list of all the companies I’ve sent my resume to during the week. You might be able to get some ideas…
```dataview
TABLE ui_company_id AS "Company", ui_contact AS "Contact", ui_title AS "Title", ui_method AS "Method", ui_results AS "Results"
FROM "Journal/Daily"
WHERE contains(dateformat(date(file.name,"yyyy-MM-dd")+dur(1 day),"yyyy-'W'WW"),this.file.name) AND ui_company_id
SORT file.name ASC
What it does is convert the daily note name into it’s corresponding week number. It then compares the parent week note’s file name to see if they match. The +dur(1 day) is because I want my weeks to start on Sunday.
Thanks, but that is not what I am looking for; I don’t want to embed whole pages, I only want data. I didn’t write down exactly what I needed it for, but I want to track my sleep patterns in a sort of spreadsheet using dataview.
(edit: oops this was meant for the calendar comment)
The example doesn’t embed pages. It generates a table of data using inline metadata. Any day I send out a resume I place the following from a template into my daily note…
If I send out multiple resumes, I just insert another one of these blocks. The code block creates a table telling me which days I applied and the values of my inline metadata.
I place the dataview query in my weekly note, which has a name like 2024-W46. Then in my daily note which lives in the “Journal/Daily” directory , for example 2024-11-14, I put the Contact block.
My weekly note with the Dataview block will now have a table entry with a link to 2024-11-14, as well as the metadata fields.
The Dataview query will only look at the daily notes that are in the same week as the weekly note
Dataview uses Luxon Token date formatting, which is different than the date format used in the Periodic Notes plugin. The two formats mean mostly the same thing…
Period Notes Week Format : gggg-[W]ww
Dataview Luxon Format yyyy-'W'WW