Bases view - all notes with links from current note

What I’m trying to do

On a note, insert bases block to:

  • Show all notes in a folder
  • That have a link from the current note (which holds the bases code)

Things I have tried

I saw this topic and tried the solution, with no luck. Show and filter on "inlinks" - #3 by cjt3

A few dozen ChatGPT, Grok, etc. produced code snippets.

Here is my bases code (which returns nothing despite many files in folder with links from the current note):

views:
  - type: table
    name: Table
    filters:
      and:
        - file.inFolder("Folder Name")
        - file.hasLink(this)

Many thanks in advance with what I a missing.

Hi.

Does this work, at least in part?

```base
views:
  - type: table
    name: Table
    filters:
      and:
        - this.file.links.contains(file)
```

Reference: Show outgoing links in Bases - #4 by dawni

Bless you! I appreciate it. Thanks.

2 Qs:

  1. Is there a deeper syntax manual that what is on the Obsidian site – to learn proper construction of items like your this.file.links vs my construction? e.g. I tried to find the guide defining when to use “-” such as in different filter items, but was unlucky. I figured there is a deeper guide somewhere.

  2. Just thinking ahead, using your pattern, is it possible to to find notes linked to the current note either directly or via a chain of links?

Note A
     - (links from A) Note B
           - (links from B) Note C
                - (links from C) Note D

Note A, a Bases block for a listing of any note connected directly or indirectly to A -- which would return A, B, C, D --- not just A?

1 Like

Apologies for the late reply.

  1. Not that I am aware of. I just hunt around on the forum, or search with Google. Think Obsidian Discord is a good resource.
  2. Sorry, don’t know how to do that. Hope someone else can help. Expect it is possible.