How do I get a list of broken links in my vault using the base syntax?

This dataview-snytax finds broken links in my vault:

TABLE without id 
out AS "Uncreated files", file.link as "Origin"
FLATTEN file.outlinks as out
WHERE !(out.file) AND !contains(meta(out).path, "/")
SORT out ASC

How do I get a list of broken links using the base syntax?
Thanks for your help.

This base:

```base
formulas:
  uncreated links: file.links.filter(!value.asFile().isTruthy())
views:
  - type: table
    name: Table
    filters:
      and:
        - formula["uncreated links"]
    order:
      - file.name
      - formula.uncreated links

```

The Filter and Properties formulas are the same:

file.links.filter(!value.asFile().isTruthy())
4 Likes

Thank you, dawni; that works very well. I receive a list of files containing broken links. Is it also possible to display each broken link in a separate line?

Is it also possible to display each broken link in a separate line?

As in give each uncreated note its own row? No, Bases doesn’t support that. Sorry it won’t look the way you were hoping! Each row in a base represents exactly one existing file.

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