Show alias of file name as result in dataview

Things I have tried

Hi all,

I’ve tried going through the dataview documentation and tried to use the WITHOUT ID and aliases AS Name part of the TABLE command, but I don’t know how to make that result a link to the document. I thought that I could perhaps have the result of the first column (file) show the alias instead, but I’m stuck!

What I’m trying to do

I have a bunch of subject MOCs that I want to present in a list on an index page from a dataview query that uses each MOC’s alias rather than their respective file names (because I don’t want a massive list of entries with MOC in their name). So instead of:
[[Editing MOC]]
[[Marketing MOC]] et al…

it should simply be:
[[Marketing]] et al…

It’s worth saying that I’ve only been using Obsidian for a week or so and I’m not that savvy when it comes to JavaScript, so I’d like to stick with basic query language if that is possible, though I’m happy to learn JS if there’s no facility for it.

Thank you in advance for any help.

1 Like

I found out how to do this. For anyone who stumbles across this, you use this syntax:

TABLE WITHOUT ID link(, aliases)

1 Like

How come I am getting an error?

TABLE WITHOUT ID link(, aliases)
bookNumber AS "No.",
author As "Author",
location as "Loc",
choice(series, join(list(series, seriesnumber), " #"), " ") AS "Series"
where =

Dataview: Error:
– PARSING FAILED --------------------------------------------------

1 | TABLE WITHOUT ID link(, aliases)

2 | bookNumber AS “No.”,
| ^
3 | author As “Author”,
4 | location as “Loc”,

Expected one of the following:

‘*’ or ‘/’ or ‘%’, ‘+’ or ‘-’, ‘,’, ‘>=’ or ‘<=’ or ‘!=’ or ‘=’ or ‘>’ or ‘<’, ‘and’ or ‘or’, /AS/i, /FROM/i, EOF, FLATTEN [AS ], GROUP BY [AS ], LIMIT , SORT field [ASC/DESC], WHERE

It works when I don’t have the alias syntax.

Where’s is the comma separating the first column expression from the second?

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