In my weekly/monthly notes, I log what was read in that week/month:
table Fic as "Log"
FROM [[2024-01]] and #periodic/daily
where !contains(Fic, null)
sort file.name desc
Doing it separately is easy enough.
I’d like to get both Fic and Nic under one “Read” table.
Things I have tried
Read:: NFic:: – pulling “Read”, but then I still have “NFic::” in my table, messy.
I’d like to stick with the way I’m logging unless there’s no way round it.
I was thinking different colour books for Fic and NFic, but actually this is the simple version.
Once past this hurdle, I’ll want to add audiobooks as an additional label, so trying to keep it simple.
Actually I could do with some logical understanding of how this is working. I’ve managed what I have through trial and error:
table Fic as “Log” << is there any way of using an OR/AND here?
table Fic OR NFic as “Log”
where !contains(Fic, null) << this I’ve not got my head round
where contains(Fic, “”) also works, why?
where contains(Fic, “”) also works
Thought there may be a way to do this by me logging my reads nested as:
It kind of depends on a lot of factors how I’d tackle your questions. If we assume that you might have multiple Fic or NFic in your daily notes, and wants to combine them into a single list, you could do something like:
nonnull(flat(list(Fic, NFic)) as "Log"
But that will not give you the opportunity to separate between those entries later on. You could possibly introduce some flag, if you after joining the list together flatten the entire thing and check for presence in either list. But this depends on your use case again.
So the simplistic starter query with joining them together would result in:
```dataview
TABLE readList as "Log"
FROM [[2024-01]] and #periodic/daily
WHERE Fic OR NFic
FLATTEN list(nonnull(flat(list(Fic, NFic)))) as readList
SORT file.name desc
```
One possible solution using flattening could look something like:
```dataview
TABLE readItem as "Log", isFic
FROM [[2024-01]] and #periodic/daily
WHERE Fic OR NFic
FLATTEN nonnull(flat(list(Fic, NFic))) as readItem
FLATTEN contains(Fic, readItem) as isFic
SORT file.name desc
```
Do either of these (untested) queries make sense, and give you a way forward?