What I’m trying to do
I am trying to create MOCs for certain types of notes. The YAML property (parent) has a link to a document ( “[[+ TestPage]]” ). I just want the table to show the files that have this property.
This is the code as it stands now, which I pieced together, and the forum helped refine it previously.
let docs = dv.pages().filter(doc => doc.parent === '[["+ TestPage"]]');
var randos = (docs) => {return docs.sort(() => .5 - Math.random()).slice(0,10);}
dv.table(["Note", "Date Modified", "Progress"], randos(docs)
.sort(k => k.summary_progress, 'asc')
.sort(s => s["date modified"], 'asc')
.map(d => [d.file.link, moment(d["date modified"]).format('MMM DD, YYYY'), d.summary_progress] ))
Things I have tried
I don’t know enough about coding to know what I’m doing wrong. I’ve tried several attempts to target the property correctly. I’ve checked the forum, the internet, and ChatGPT. Nothing has worked.