Dataview WHERE query of list property does not filter non-matches

What I’m trying to do

I am trying to make the following query return only what is in the search string. It should list only records that have the term “MLC” as a list item in my frontmatter attribute called “projects”. Presently however, it returns every file in “Calendar/Events”, seemingly evaluating everything as true.

TABLE file.link AS Meeting, attendees AS Attendees
FROM “Calendar/Events”
WHERE any(projects, (a) => a.value = “MLC”)

Things I have tried

I have tried different search strings but and a null search string but it always returns the same results.

have you tried WHERE contains(projects,"MLC")

Yes, but then I don’t get any records returned

I have also tried:

WHERE any(projects, (a) => a.name = “MLC”)

This entire note works in a test vault. Does it work for you?

---
projects:
  - XYZ MLC Windows
---

```dataview
TABLE
projects
WHERE contains(projects, "MLC")
```
1 Like

it should also work this way:

---
projects:
  - XYZ
  - MLC
  - Windows
---

```dataview
TABLE
projects
WHERE contains(projects, "MLC")
```
1 Like

Yes. Does for me. And if it works for the OP, it would suggest that there is an issue to resolve with the rest of the original query. Hopefully a useful diagnostic.

1 Like