Bases: Filter property with dynamic value (file name)

How to make this filter dynamic to the current note name?

filters:
  and:
    - or:
        - area.contains(link("test"))

This works, but its not dynamic. I need to hardcore the property value.

I had this working:

filters:
  and:
    - or:
        - file.hasLink(this)
        - file.hasLink(this.file.name.replace('.base', '.md'))

but it brings any note that has a link that matches my current file name.
I need to narrow it down to match a specific property.

Any ideas? Thanks!

I added “Bases:” to the title so it’s clear what you are asking about.

Found the solution.

This works for me


filters:
  and:
    - or:
        - note.area.contains(link(this.file.name))
        - note.area.contains(link(this.file.name.replace('.base', '')))