Passing arguments in DataviewJS dv.view() doesn't seem to work?

I looked closely at the documentation DataviewJS dv.view() but I’ve been having trouble getting it to work. I have this JS under Scripts/tasks.js whichj also uses the Metadata Menu plugin:

const { fieldModifier: f } =["metadata-menu"].api;
const { query } = input

    await Promise.all(
            .sort(b => -b.AtomicID)
            .map(async d => [
                f(dv, d, "Date Started"),

And I make this query:

await dv.view("Scripts/tasks", {query: "'#Obsidian-Tasks'"});

but its empty. This is a shorter version of a longer query I’ve been trying to work with a lot more columns. It works fine when I write in something for query right on the script. Can someone tell me what I’m doing wrong if anything or how to troubleshoot it?

Your query parameter value is wrong. You’ve added an extra pair of quotes

It should be:

await dv.view("Scripts/tasks", {query: '#Obsidian-Tasks'});

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