Combine dataview queries to create table of notes AND tasks

What I’m trying to do

I am trying to create a single activity log table that shows all the notes and tasks (created via Tasks plugin) completed on a specified day.

Things I have tried

Thanks to other forum posts, I have managed to create two dataview tables with parallel structures for both my notes and my tasks. However, I remained stumped on how to combine them.

Reproducible Example

In folder meetings, I create datestamped meeting notes, which can contain tasks.
For example, [[2023-06-08 🀝 project-mgmt]]:

---
date: 2023-06-08
tags: moment/mtg🀝
topic: "project-mgmt"
people: "[[john doe]], [[jane smith]]"
time: 60
---

# Notes:
- Project management is important
- [x] send email about project management πŸ•°15 βž• 2023-06-08 βœ… 2023-06-08

In my root folder, I have file [[2023-06-08_daily-note]], in which I add tasks and also would like to view my activity log of all meetings and tasks on specified day:

# Tasks Inbox
- [x] read about project management πŸ•°40 βž• 2023-06-08 βœ… 2023-06-08
- [x] write about project management βž• 2023-06-08 βœ… 2023-06-08

# GOAL: Activity Log (Meetings + Tasks)
| link                                    | time | type  | people                       | topic                               |
| --------------------------------------- | ---- | ----- | ---------------------------- | ----------------------------------- |
| [[2023-06-08_daily-note > Tasks Inbox]] | 40   | task  | β€”                            | read about project management       |
| [[2023-06-08_daily-note > Tasks Inbox]] |   β€”   | task      |β€”                              |   write about project management                                  |
| [[2023-06-08 🀝 project-mgmt > Notes:]] | 15   | task  | β€”                            | send email about project management |
| [[2023-06-08 🀝 project-mgmt]]          | 60   | mtg🀝 | [[john doe]], [[jane smith]] | project-mgmt                        |

Here’s what I’ve managed:

Activity Log: Meetings

TABLE WITHOUT ID
	link(file.link) AS link,
	time,
	regexreplace(tags, "^.*/", "") AS type,
	people, 
	topic
FROM "meetings"
WHERE startswith(file.name, "2023-06-08")

Activity Log: Tasks

TABLE WITHOUT ID
	link(tasks.link) as link,
	choice(contains(tasks.text, "πŸ•°"), regexreplace(tasks.text, "(^.*πŸ•°)|\s.*$", ""), "β€”") as time,
	"task" as type,
	"β€”" as people,
	regexreplace(tasks.text, "(πŸ•°|βž•|βœ…).*$", "") as topic
FLATTEN file.tasks as tasks
WHERE contains(tasks.text, "βœ… 2023-06-08")

The question

How can I get these into one table?

Thank you for your help!

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.