Dataview: List Contains

Hello Guys,

What I’m trying to do

I am trying to search for a String in a Metadata List


I am listing different “topics” in a metadata list, and later want to list (in a file specific for this topic) all notes that are related to this.

I already tried with

WHERE contains(topic, "Setlist")

but sadly it does not work this way (probably because it is not a “field” but a “list”)

Do you have any ideas on how I can fix that?

Thank you very much in advance

For me, it’s working with this code block :

```dataview
LIST
WHERE contains(Topic, "Setlist")
```

Doesn’t that give you anything? Are you sure of your syntax?

Edit : Also check the spelling of your field name, it is plural in the properties, and singular in the code you put, it must be the same word.

1 Like

Despite i had a typo (topic → topics) in the orignal post, it does sadly not work anyways

What is displayed? Can you post a screenshot of what appears and copy and paste your note here? Normally this should work so there must be a problem somewhere. Is nothing displayed or a syntax error?

1 Like

ok thanks guys I have a solution

LIST
WHERE contains(topics, [[Setlist]])

i dont know why the other method (“Setlist”, Setlist) does not work :slight_smile:

1 Like

Ah, yes, I didn’t see that it wasn’t text but a link that you had put in the property. That’s why. With a link you must actually put the hooks of the link.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.