This.file appears to be undefined when referenced directly within bases

Steps to reproduce

  • Open sandbox vault
  • Create subfolder
  • within subfolder, create a base, title “TestBase”
    • All Views filter conditions:
      • file.folder.contains(this.file.folder)
      • file.name != this.file.name
    • (Optional) add Property = formula “this.file”
  • Create a new note, title “TestNote”
    • add an embedded reference to “TestBase” - ![[TestBase.base]]

Did you follow the troubleshooting guide? [Y/N]

Yes

Expected result

In the TestBase, you should see the TestNote but not the TestBase. If you added the property, it should show the TestBase in the property column

In the TestNote, you should see the TestBase but not the TestNote. If you added the property, it should show the TestNote in the property column

Actual result

In the TestBase, the base is empty.

In the TestNote, the TestBase is correctly shown, and the TestNote is correctly not shown

Environment

SYSTEM INFO:
Obsidian version: v1.9.14
Installer version: v1.9.12
Operating system: Windows 11 Pro 10.0.26120
Login status: logged in
Language: en
Catalyst license: none
Insider build toggle: off
Live preview: on
Base theme: adapt to system
Community theme: none
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
none


Additional information

Currently, in the docs, this is defined only when the note is in the sidebars or when the note is embedded (and it has two different meanings)

Okay, I was able to find that but the way it was written it was easy to gloss over it.

For my particular use case, I was trying to use the Folder Notes plug-in to attach the base directly to the Folder to summarize the content of the folder. I can work around it by embedding it in a note, of course, but it would be nice if this eventually worked directly on base files themselves.

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