What I’m trying to do
I only want to show tasks in my dynamic base embedded in a project note that have a frontmatter link to the project I’m viewing. If it’s not linked, it shall not show.
In the setup below both Task 1 and Task 2 show in Project 1, although only Task 1 has a link to Project 1.
Things I have tried
This is my setup:
Tasks.base
views:
- type: table
name: Table
filters:
and:
- project.contains(link(this.file.name))
Task 1.md
---
project:
- "[[Project 1]]"
---
Task 2.md
---
project:
- Project 1
---
Project 1.md
![[Tasks.base]]
BTW: Do we have a way to see what is rendered in link(this.file.name), e.g. via console?
1 Like
Pch
November 19, 2025, 8:50pm
2
I think you could try, as a filter :
project.contains(this)
or
project.contains(this.file)
this/this.file representing the file object the base is embedded in, it should discard the non-link/string values in the project key (I think )
You could also have something like:
project.filter(value.isType("link")).contains(this)
or
project.filter(value.isType("link") && value == this)
… if you want to “test” the type of the values stored within the project key and discard the ones you don’t need
I generally use a formula property when I want to test/render something (formula/filter) … as I don’t think you can console.log() formula results
@Pch
Thanks! All of your options work in my test vault!
In my actual working vault I ran into an issue with an error "Failed to evaluate filter: Type error in "contains", parameter "value". Expected String not, given File.
This happens when you change from property type text to list and still have text entries like:
project: "[[Project 1]]"
instead of list type:
project:
- "[[Project 1]]"
Pch
November 19, 2025, 10:34pm
4
For a text type of key, in which you can only store either a link to project file or a simple string bearing the name of the project, I guess you could use, as a filter :
project == this
or
project == this.file
or
project.isType("link") && project == this.file.basename
… and some other variations also seems to work in my quick tests
2 Likes
Various forms of property notes:
task1-list-and-link-form
---
tags:
- test
project:
- "[[projectXYZ]]"
---
task2-list-form
---
tags:
- test
project:
- projectXYZ
---
task3-text-form
---
tags:
- test
project: projectXYZ
---
Below are the bases in a note called projectXYZ displaying all tasks depending on the type and form of property:
filters:
and:
- or:
- note.project.isType("list") && note.project.contains(link(this.file))
- note.project.isType("list") && note.project.contains(this.file.name)
- note.project.isType("string") && file(note.project).toString().contains(this.file.toString())
views:
- type: table
name: Table
order:
- file.name
- project
The first form is recommended.
The second is a transitional form for when you’re already using lists but not yet using links.
The third is for older notes.
Why added in a group or nested?
To add any additional conditions at a higher level.
1 Like
Dr.DaKa
December 24, 2025, 9:16am
6
Thank you so much. This helps me a lot!
1 Like
system
Closed
March 24, 2026, 9:16am
7
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.