How to get all notes that contain one of the alias in their title?

A note has following yaml frontmatter:

---
Alias: aliasA, aliasB, aliasC
---

I want to get all the notes, of which their title contains either of the above aliases.
No attempt yet, since I have zero clue to get starting with… other than flatten alias.

Any idea could be helpful, thanks for the time!

So something like the following might be what you’re looking for:

```dataview
LIST
FLATTEN this.file.aliases as alias
WHERE contains(file.name, alias)
```
Test run in my test vault

With a frontmatter field like alias: File, John this produces this output in my test vault:

One could consider if one would want to use exact matches for some of the cases. And if one want to look the other way around, maybe parts of my answer (and especially the list build at the start of that template) below could be useful.

1 Like

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