What I’m trying to do
I have notes in a folder with properties as follows:
---
chapter: 1
status: Waiting
words: 300
date: 2024-12-10
---
I want to make a dataview table to display these notes and their properties as such:
TABLE
chapter as "Ch.",
status as Status,
date(today) - date as Since,
words as Words
FROM "Example folder"
WHERE category != "overview"
SORT status
My problem is that if a note has the date property but the property has been cleared (using the “clear” button in the date picker), it does not show up in the table.
Clearing a date value from the date property looks different in source mode than an empty date property.
An empty date property looks as follows: date:
.
Clearing a date value looks as follows: date: ""
Those quotation marks seem to be causing problems for dataview that causes the note to not be listed in the table.
Things I have tried
I tried putting the line of the table code about the date property in a choice function as follows:
choice(date != "", date(today) - date, "none") as Since,
or
choice(date != "\"\"", date(today) - date, "none") as Since,
or
choice(date != null, date(today) - date, "none") as Since,
None works.
I have also looked at lots of forum posts, asked ChatGPT, and poked around the Dataview documentation.