So if I understand correctly, you are writing your links into a frontmatter field in order to hide them from your note content, and then you want to write a dataview query in order to see them again in your note?
OK, we are slowly approaching an understanding of what you are looking for: you want a table where the first column shows, for example, “Spell 1”, and the second/third/ etc. columns show the content of “rank” and “description” from the file Spell 1?
The layout of the result isn’t that important, the main problem is to be able to use a list from within a metafield as a source for the dataview table.
As far as I know wikilinks in frontmatter are not yet supported by obsidian - so I guess they cannot be read by dataview as outlinks. Possibly some regex in the dataview query could achieve the desired result…
Why don’t you put your outlinks into a comment? (%%[[YourLink]]%%)? Then they aren’t visible on your note in reading view but can easily be searched by dataview:
There are some other alternatives too, so try putting the stuff below into a file and check out which version you like:
---
Tags: f61088
quotedLinks:
- "[[spell 1]]"
- "[[spell 2]]"
namedLinks:
- spell 1
- spell 2
---
questionUrl:: http://forum.obsidian.md/t//61088
## Proof of Concept
```dataview
TABLE WITHOUT ID quotedLinks, link(namedLinks)
WHERE file.path = this.file.path
```
## Using quotedLinks
```dataview
TABLE WITHOUT ID qLink as Spell, qLink.type, qLink.rank
FLATTEN quotedLinks as qLink
WHERE file.path = this.file.path
```
## Using namedLinks
```dataview
TABLE WITHOUT ID nLink as Spell, nLink.type, nLink.rank
FLATTEN map(namedLinks, (l) => link(l)) as nLink
WHERE file.path = this.file.path
```
This assumes there to be a “spell 1” and “spell 2” note somewhere in your vault, but other than that it shows two variants of having something resembling links in the frontmatter. I say resembling, as neither of these will show up in backlinks or graph views, and they’ll not be renamed if you rename the spell notes. They also vary a little in handling, and how they appear in reading view.
I amwas not sure how the comment variants presented by @alltagsverstand will operate related to the same issues, so you need to test it out, and consider what matters the most to you. Update: It seems like even though in comments, Obsidian will still treat them as ordinary links, so they’ll show up in backlinks, graph views, and be renamed, and so on.
@holroy This is very interesting - so dataview can follow links that are not even treated as links by obsidian and read the respective files’ contents… Didn’t know that (in fact, never came up with the idea to try it out… ).
But (just in case you didn’t realize) be aware that
Especially in the latter case (if you ever would rename, for example, “Spell1” to “Spellxyz”), your link as well as your dataview table will be broken and it will be difficult to reconstruct which connection you had established originally!
To combine the two to get the best out of it, you could also consider doing this variant:
```dataview
TABLE WITHOUT ID spell, spell.type, spell.rank
FLATTEN spells as spell
WHERE file.path = this.file.path
```
%%
spells:: [[spell 1]]
spells:: [[spell 2]]
%%
Notice how we’re using multiple lines of setting the inline field, spells, to make it into a nice list of values. This could also be shown other places in the text, either as [spells:: [[spell 3]]] or my favorite with a hidden key name, like (spells: [[spell 4]]). The latter allows for stuff like:
After you complete [[The earthly challenge]], you gain access to the (spells:: [[Earth spell]]), which allows you to use earth for something.
Which you could style to whatever, but with my current theme settings shows as:
Note that one could think about using markdown lists within the comment section, but file.lists doesn’t include lists within comment sections, so then one would have to make the list show in the note. The alternatives above is kind of a mix allowing for it to behave like a list of spells, while one maintains the “normal” link behavior.
@holroy After @mnvwvnm obviously disappeared from actively following this forum, you definitely have become the new dataview guru!
Btw (even if I mess up this thread with a different topic): for a couple of weeks now, hidden key names don’t work anymore for me - as a result, both the key and its value are completely hidden!
Edit: Just found out myself - for a reason I no longer remember I suppressed the appearance of inline fields via css…