Skip to content

Got Dataviewjs working (wooo!), now, how to group by? #259

Answered by mdelobelle
pe-wu asked this question in Q&A
Discussion options

You must be logged in to vote

Hi
this function is not async anymore so you can remove the async calls
And there were some issues with your code, could this work for you?:

const {fieldModifier:f} = this.app.plugins.plugins["metadata-menu"].api;

for (let group of dv.pages('#wakeout_task and -"Templates"').groupBy(p => p.project)) {
    dv.header(3, group.key);
    dv.table(
       ["Task","Urgency","Importance","Summary","Status"],
       dv.pages("#wakeout_task").map(p => [
           p.file.link, 
           f(dv,p,"urgency"),
           f(dv,p,"importance"),
           p.summary,
           f(dv,p,"task_status")
       ])
    )
};

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@pe-wu
Comment options

Answer selected by mdelobelle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants