Bases filter equivalent to file.outlinks

What I’m trying to do

I am trying to convert this Dataview query to Bases:

table without id
	file.link as Notes,
	choice(date, date, created) as Date
where
	!contains(category,[[People]]) and
	contains(file.outlinks, this.file.link)
sort file.name desc

Things I have tried

formulas:
  Untitled: if(date.isTruthy(), date, created)
properties:
  formula.Untitled:
    displayName: Date
views:
  - type: table
    name: Table
    filters:
      and:
        - '!category.contains(link("People"))'
        - file.hasLink(this.file)
    order:
      - file.name
      - formula.Untitled
    sort:
      - property: date
        direction: DESC
    columnSize:
      file.name: 380

My suspicion is that file.outlinks and file.hasLink(this.file) is not completely the same because one single note is missing in my Bases table. In that note I am referencing the note where this bases is with [[Bases-Note]] in the text area (non-Frontmatter).
Other filters I have tried without success:

file.asLink(this.file.asLink())
file.asLink(link(this.file))

On the right side I can see my “missing” note in the “Linked Mention” in the Backlinks view though.

Does anyone have any other ideas how I can get this to work or is this a functionality the Obsidian team is working on?

file.hasLink(this) ought to do it, but I would expect your version to work too.

If the above version still omits your one note, then this might sound odd, but does removing the !category filter show the missing note (in addition to any category: [[People]] notes that had been filtered out, of course)?

file.hasLink(this) returns the same results. However, after removing the first filter the missing note is actually shown! The missing note does not have “category” in its properties so I wonder if this is maybe a bug how non-existing properties/null is treated in a contains filter within Bases?

EDIT: !file.hasLink("Categories/People") works. My missing note is showing up.

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