Failing to make a table for a week note that automatically pulls data from its component day notes

What I’m trying to do

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

File______________Day__________
Sunday 11 note    2024-01-11
Monday 12 note    2024-01-12
Tuesday 13 note   2024-01-13
...               ...

I am pretty sure you can identify procedurally generated files with
.../daily notes/<% tp.date.("dddd Do[ note]")%>
is this correct?

Day______Other data___
Sunday   ...
Monday   ...
Tuesday  ...
...      ...

(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

If you’re also using the Calendar plugin, the following feature might be helpful…

Embed your entire week in a weekly note

If you add the following snippet to your weekly note template, you can a seamless view of your week in a single click.

## Week at a Glance 
![[{{sunday:gggg-MM-DD}}]] 
![[{{monday:gggg-MM-DD}}]] 
![[{{tuesday:gggg-MM-DD}}]] 
![[{{wednesday:gggg-MM-DD}}]] 
![[{{thursday:gggg-MM-DD}}]] 
![[{{friday:gggg-MM-DD}}]] 
![[{{saturday:gggg-MM-DD}}]]

I just looked, and the Periodic Notes also appears to support the same feature.

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…

###### Contact
- [ui_company_id:: Google]
- [ui_contact:: https://google.com]
- [ui_title:: Programmer]
- [ui_method:: Email]
- [ui_results:: Interview]

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.


Help me out here, what am I missing?

Good question. I should have been clearer.

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

thanks!

it worked!, it will help, but it isn’t the silver bullet to my problem I don’t think; let me work on it some more tomorrow.

Best of luck!