What I’m trying to do
Hello community,
referring to this topic:
I just want to limit the output of the dataviewjs output.
Things I have tried
my customized code looks like this:
const {fieldModifier: f} =
this.app.plugins.plugins["metadata-menu"].api;
dv.table(['Task', 'status', 'beg', 'Z', 'due'],
await Promise.all(dv.pages('"Projekte"')
.where(p => (p.projekt == dv.current().projekt))
.where(p => (p.objekttype == "Aktion"))
.limit(10)
.map(async p => [
p.file.link,
await f(dv, p, "state", {options: {alwaysOn: true}}),
await f(dv, p, "dat-beg", {options: {alwaysOn: true}}),
await f(dv, p, "zeit-beg", {options: {alwaysOn: true}}),
await f(dv, p, "due-date", {options: {alwaysOn: true}})
]))
)
All my tasks have the frontmatter value:
procedure: Aktion
and belong to a project which is set as i.e.:
project: [[Projekt so and so]]
But the query of dataviewjs from above gives “no results” back.
I think it has to be something to do with the where-clause
.where(p => (p.projekt == dv.current().projekt))
because when I remove this line, I get results, which I can edit (metadata Menu).
But I need only the results of the current File (project).
I also tried it with the &&-Operator
- also negative.
I tried, too:
.where(p => (p.projekt == this.projekt))
- negative.
How do I narrow down the output for only the current file (project)?
I hope, datacore is coming soon to daylight, so this will be less complicate (obsolet)
thanks in advantage