With that being said, if you changed to using lists for your log entries on progress, it would be a whole lot easier to write your query. Imagine the following list items (possibly spread across multiple files/projects):
(Within Project 1 file)
- [[2023-05-16|Tue May 16 (2023)]] I did something
(Within Project 2 file)
- [[2023-05-16|Tue May 16 (2023)]] I did something else
These should now be collectable using something like
LIST regexreplace(item.text, "^\[\[.*?\]\]", "")
FLATTEN file.lists as item
WHERE contains(item.outlinks, [])
Here the list output shows the project name, and I remove the link from the start of the list item, to only show the actual update text (with potentially any other links in there). Note that this expects the usage of [[wikilinks]] for the replace to work correctly.
This is very cool, thanks for sharing. My only concern is that I don’t think that the daily discussion and tasks I develop for each project will fit into an item from a list. I noticed that I can have single line of a paragraph, but not multiple paragraphs with figures. I am looking more for a solution that do exactly the same thing but for sections initiated by a header.
You could use the import sections from headings which I linked to, but I’m make common from a different world of documenting where I feel that’s just to much.
However, if you’ve got longer section and figures and what not, maybe it could be an alternative to use tasks to summarise that section (and not list item). This will have the added benefit over a pure list item, that the task will provide a link back to the project.
This way you’ll get a succinct summary with a link back option in your daily notes, so that you’ll get a quick overview of what you achieved, whilst still have an easy access to the details.
If this sounds interesting, I could whip up an example depicting how this could be written.
How you write and style custom checklists/tasks like this is up to you, but one way could be to do:
- [a] [[2023-05-15|Mon May 15 (2023)]] The do nothing day
Nothing much done this day, but I made an entry...
E = mc^2
- [a] [[2023-05-16|Tue May 16 (2023)]] This is the summary of what I did this day
Here I will put all the notes with everything I did that day.
other something else
The query to use in a daily note could be something like:
FLATTEN file.link + ": " + regexreplace(text, "^ *\[\[.*?\]\]", "") as visual
WHERE contains(outlinks, [])
Which using the Minimal theme would display like:
Here I’ve removed that link to the daily note, and instead added the “project name” to the start of the line. Either of those is of course optional, and you can change to your preferences.
The extremely nice thing is that you can click on the text of such an entry and get directly to that place within the project note:
Similarily you could have another query to summarise your projects like this:
WHERE status = "*"
AND file.folder = this.file.folder
GROUP BY file.name
Still allowing for the backlink on the text of each task. Also note that if you feel like it you can choose to use other status characters, and style them according to wishes. E.g. you could choose to have a given character to indicate that this is a project task summary, or you could designate different characters to different projects, and so on.