Dataview : Need Help Pulling Bullet Points That Match Specific Queries From Another File Into Daily Note

Instead of using multiple files for daily notes I have been using 1 text file for 2023 with a bullet point for each entry beginning with the date, time, and the type of entry. I use Alfred on mac and Drafts on ios to quickly add entries to my 2023-s.md file.

My entries look like this:

- 230829 08:01 [[+thought]] : random thought goes here
- 230829 17:21 [[+reflection]] : reflection of the day goes here
- 230830 11:21 [[+thought]] : random thought goes here
- 230830 11:30 [[+thought]] : random thought goes here

Question:
How can I keep my 2023-s.md file usage exactly the same but I want to add using dataview in my daily note to pull specific bullet points and place them under their appropriate headers/callouts in my daily note?

How can I incorporate dataview in a way where its pulling all the bullet points from the 2023-s.md file that have TODAYs date (in yyMMdd format) & contains [[+thought]] in the bullet point?

What I am trying to do (Example):

	##thoughts
	```dataview
	- display bullet points from 2023-s.md
	- matching TODAYs Date (in yyMMdd format)
	- display only bullets points that contains "[[+thought]]"
	```




What I Tried So Far:

	## Thoughts
	```dataview
	LIST
	FROM "01 Projects/01 Daily Notes/2023-s.md"
	WHERE contains(text, "[[+thought]]")
	```

I can target the file (without the WHERE query), but thats as far as I can get it to work… targeting the specific bullet points within the file is what I’m struggling with.

You need to use FLATTEN file.lists as item on the 2023 file, and then limit the start of each item according to today’s date. To do the latter use a combination of substring() or startswith() , with a date formatted accordingly to your format.

Is this enough to get you going?

I wasn’t able to get too far with the docs… and for some reason my obsidian keeps freezing when I try to preview the dataview query.

Here’s what I have:

    ```dataview
    LIST
    FLATTEN file.lists as item
    FROM "01 Projects/01 Daily Notes/2023-s.md"
    ```

I also tried testing another file with barely any content but it also froze.

You’ll always need to do the FROM before any FLATTEN lines.

And here is a query doing the comparison on one of the dates at the start of the bullet point:

```dataview
TABLE WITHOUT ID
  item.text, 
  startswith(item.text, dateformat(date("2023-08-29"), "yyMMdd")) as dateMatch,
  contains(item.outlinks, [[+thought]]) as linkMatch
FROM "01 Projects/01 Daily Notes/2023-s.md"
FLATTEN file.lists as item
```

The expressions I’ve used in the columns can of course be used as WHERE expressions as well. And you typically use date(today) to get todays date.

The comparison table helps a lot! I can see what I need to do, so I will play around with the query some more and see if I can figure this out.

Thank you!