Dataview: Get link from block containing inline field metadata

Is it possible to obtain the link to a block (marked with an inline field) returned from a dataview query?

Here’s what I’m trying to do

summary:: Lorem ipsum dolor sit amet, consectetur adipiscing elit.

table without id
summary as Summary,
{{ some way to obtain link to `summary` block }} as Link
from "path/to/notes"

Here’s how I envisage the result


I believe your best bet is to change those blocks into decorated tasks (or custom checkbox statuses). Then you’ll be able to do task queries to get the summaries, and they’ll provide the link back automatically.

This would also allow you to format your summaries so they’ll stand out a little more in your documents, which I think is nice for stuff like this.

See the following post (and links therein for more on this variation):

Regarding your original request, I’ve not found any links like you request. Within a list context you can get links to the corresponding header, and block if the blockId is defined. I’ve not found a way to generate the blockId from within a query/script (except potentially through text manipulation).

In a pure block context, it’s even harder to get to that reference, and it would require even more text manipulation.

So I strongly believe doing a task related approach is much better, easier, and in general more accessible. Due to styling you can also either enhance or hide extra formatting according to your needs.

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