I have a simple dataview query to list all active projects:
dataview
LIST FROM #project
WHERE status = "active"
or alternatively, since they are also all in a folder called ‘Projects’:
dataview
LIST FROM "Projects"
WHERE status = "active"
But in each case it’s only matching some of the matching pages. All the pages have a property called ‘status’ whose value is ‘active’, yet most are not matching. Can anyone suggest why this might be?
If you go into “Source” view, you’ll likely be able to see the difference between the pages that are returning and those that aren’t. I just saw someone else have this issue, and I suspect it’s from Obsidian Properties reformatting a bunch of people’s metadata.
WHERE status = "active" only works if you have metadata that’s a single text property, like so:
---
status: active
---
However, “status” is shown in your screenshots as a “List” type, not a “Text” type, so a lot of your notes likely got reformatted by Properties to be like this:
---
status:
- active
---
When things are formatted this way, you need to switch to using “contains” to find your stuff:
dataview
LIST FROM #project
WHERE contains(status, active)
You can read more about contains() here, if you want to understand better how it works: Functions - Dataview