Dataview: how to replace 'file' column in tables

If you want to remove the generic title ‘File’ from the first column of a dataview table, you can use TABLE WITHOUT ID.

However, this removes both the titles of the notes and the clickable links that are normally generated.

If you want to…

  1. keep the titles of all the notes,
  2. keep the clickable links, and
  3. give the ‘File’ column a unique title,

…you can use TABLE WITHOUT ID and add file.link as a column that has a user-defined title.

In the following example, dataview will create a table where file.link has the title ‘Film’.

```dataview

TABLE WITHOUT ID
file.link AS Film,
DateWatched AS When

FROM
[[films]]
AND 
-"templates"

WHERE
file.name != this.file.name
AND
file.name !="films to watch"

SORT
DateWatched
DESC

LIMIT 
25
```

Angel

14 Likes

I thought that only dataviewjs is able to hide the File column. Never knew this, thanks for sharing!

Welcome. Took me a while to figure this out. Perhaps obvious to some people. Good to have the option.

Angel