What I’m trying to do
Trying to create a grouped table that only displays notes that contain a backlink in the frontmatter from a specific folder. So it filters out the tables to only include the ksb that I specify. E.g. it only displays notes with the K2 link:
Things I have tried
I currently have the following which works in displaying the grouped table based on the Module:
for (let group of dv.pages('"University Learning"')
.groupBy(m => m.module)){
dv.header(2, group.key);
dv.table(["Lecture Notes", "Date"],
group.rows
.sort(l => l.date, 'asc')
.map(l => [
l.file.link,
l.date
]
)
)
}
What I tried based on some help forums but don’t work:
for (let group of dv.pages('"University Learning"')
.where(k => dv.func.contains(k.ksb, dv.func.link("K2")))
.groupBy(m => m.module)){
dv.header(2, group.key);
dv.table(["Lecture Notes", "Date"],
group.rows
.sort(l => l.date, 'asc')
.map(l => [
l.file.link,
l.date
]
)
)
}
It should not display the notes with the cross as they don’t have the k2 link:
Any help is greatly appreciated