Dataview not showing property fields with dashes

What I’m trying to do

I’m trying to make a simple dataview table that groups by a single tag, say show all “meeting notes” for project “obsidian” so

TABLE date as "Date", project AS "Project", participants AS "Participants"
WHERE project = "Obsidian" AND type = "meeting notes"

This works fine. The problem occurs with how the frontmatter/property is done. When I use quickadd, or just add the property “Obsidian” by hand, it enters just fine. It doesn’t, however, show up in the query. When I look at the md file “Obsidian” is added as

project:
- Obsidian
which seems to be invisible to dataview with the above query. When I adjust it to
project: Obsidian
then it appears.

Further, once it appears, if I had “Multiple participants” like
participants:
-Joe
-Susie
-Billy
All of those will show up in the table

Things I have tried

I’m not sure what to try. I don’t want to edit the properties since that’s the default way they’re listed, but dataview seems to think when using “WHERE” that these are incorrect. When I choose a LIST instead I get something like

  • Dog
  • Cat
    Bird
    Fish

And it’s treating those first two properties differently than the second two by including the dash and space as though they are part of the category.

What am I doing wrong?

If a property is a list you need to use contains(project, "Obsidian"), only if it is a text property (and a single value) can you use project = "Obsidian".

If you’re unsure what you have in a multitude of files, you can use: contains(flat(list(project)), "Obsidian") which converts both single values and list values into a single list of values.

1 Like

[Edit: Oops, I was typing while @holroy posted his solution. Sorry for the duplication of info]

It appears that your project and type properties are currently set in your vault to the “List” type, which is why you’re getting the hyphens. You can change this by clicking on the little icon to the left of these properties and choosing the “Text” type. Then you’ll no longer get the hyphens. However, if you do want them to be lists, you need to treat them a little differently in your searches. The trick is the contains( ) function.

```dataview
TABLE date as "Date", project AS "Project", participants AS "Participants"
WHERE contains(project,"Obsidian") AND contains(type,"meeting notes")
```

As far as your participant question goes, I wasn’t quite sure what you were asking.