Daily Notes and a Food Log (via Dataview) - Need help

I’m toying with a food log using Daily files and Dataview, however I’m running into an issue.

My daily notes have a ‘Log’ section that is separated via h4s. Example:

## Log

#### 11:11 PM - Phone call from John
He wanted this.

#### 12:12 PM - Bill stopped by
He wanted that.

I would like to add items like:

#### 12:12 PM - [[Food Log]]
foodlog:: apple
meal:: snack

There would be one for every time I eat something.

Then on [[Food Log]] I would have a dataview codeblock to pull in everything I ate. From there I could filter by day or month or whatever.

DV:

```dataview
table meal as Meal, foodlog as "Food Ate"
from ""
where contains(foodlog, "") 
SORT file.ctime asc
```

The problem I’m running into is that if I have multiple h4s with different foodlog key/values, it doesn’t work. I can only enter one per day.

Is there a work around for this?

Thanks

Are you using the latest version of DataView? It now supports multiple inline fields to return as a list. For example, I have multiple, #Watched:: This YouTube video. in my daily notes, and on days with multiple entries, it shows them all as a list. Older versions only returned the last one.

Also I’d change this

where foodlog

This fixed it.

Thank you!

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